Hi All,
At my organization, we have created attribute THD_INTEXT on the WORKORDER object. I am trying to create an auto script that makes the WPSERVICE object readonly when the THD_INTEXT = 'INTERNAL'. This auto script has a Launch Point on the WPSERVICE object, and it's running on the "Initialize value" event. See my code below:
"from psdi.mbo import MboConstants
# Get the related Work Order object
workorder = mbo.getMboSet("WORKORDER").getMbo(0)
# Check if the THD_INTEXT attribute of the Work Order is 'INTERNAL'
if workorder.getString("THD_INTEXT") == 'INTERNAL': //ERROR
# If so, set the WPService object as read-only
mbo.setFieldFlag(MboConstants.READONLY, True)"
I keep getting this error "AttributeError: 'NoneType' object has no attribute 'getString' in <script> at line number 7". I have checked database configuration, and THD_INTEXT is an attribute of the WORKORDER Object. Could someone help me understand why I am getting this error?
#MaximoApplicationSuite------------------------------
Carlos Mestre
Home Depot
------------------------------