Helo all of you,
I created an automation script as follow:
- Object Launch Point = AMSVACTRANS
- Events = Save ( Add, Update)
- AMSVACTRANS object has a relationship with another object called AMSTIMECARD through a named relationship = VACTIMESHEET.
So, the current mbo is AMSVACTRANS and I need to search for a record on VACTIMESHEET which is the zzempoyeeno.
I wrote the following to search:
mTS = mbo.getMboSet("VACTIMESHEET")
mTS.setWhere(CLOCK_IN"+'mVacstart')
if mTS.isNull("CLOCK_IN"):
else
' not exists , add new record
mVacstart = mbo.getDate("VACATION_STAT") && this is mapped to CLOCK_IN , on AMSTIMECARD
mVacend = mbo.getDate("VACATION_END") && this is mapped to CLOCK_OUT , on AMSTIMECARD
mTmesheet = mTS.add()
mTimesheet.setValue("CLOCK_IN",mVacstart)
mTimesheet.setValue("CLOCK_OUT",mVacedn)
then I got error message CLOCK_IN does not exist !
Whhile "CLOCK_IN" is an attribute on AMSTIMECARD ??
Any help to find records through the relationship ?
Thanks
------------------------------
mohammad moula
------------------------------
#Maximo#MaximoIntegrationandScripting