Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



Re: seeking help automating deletion of child records

From: Warren, Jade GRE-MG (2016-09-02 13:16)

I would create an automation script on the PERSON.STATUS attribute.
Something like:
if (mbo.getString("STATUS") == "INACTIVE"):
## Needs to reference the actual relationship btw PERSON and EMAIL table
email_set = mbo.getMboSet("EMAIL");
email = email_set.moveFirst();
while (email != None):
if (email.getString("TYPE") == "WORK"):
email.delete();
email = email_set.moveNext();
email_set.save();
## Needs to reference the actual relationship btw PERSON and PHONE table
phone_set = mbo.getMboSet("PHONE");
phone = phone_set.moveFirst();
while (phone != None):
if (phone.getString("TYPE") == "WORKCELL"):
phone.delete();
phone = phone_set.moveNext();
phone_set.save();
NOTICE TO RECIPIENT: The information contained in this message from
Great River Energy and any attachments are confidential and intended
only for the named recipient(s). If you have received this message in
error, you are prohibited from copying, distributing or using the
information. Please contact the sender immediately by return email and
delete the original message.