有没有办法在自动化脚本中修改 childMbo 时设置修改父 mbo (Python)?
Is there a way to set the parent mbo modified when childMbo was modified in Automation Script (Python)?
Automation Script Object launch point is set to parentMbo. Trigger is upon save, currently happening is when i make changes in childMbo then save() the parentMbo, it will not setValue in 'Description' attribute. I need to change parentMbo first before the changes take effect. Here's my sample code:
triggerInvoke = False
childMbo = mbo.getMboSet("RELATEDTICKET")
if childMbo is not None:
triggerInvoke = True
if triggerInvoke == True:
mbo.setValue("DESCRIPTION", "Invoke")
我对 WO/Tasks 层次结构有类似的要求。这是一个适合您的示例:
假设您在保存事件之前的子对象上有一个对象启动点。此代码应将所有者 mbo 标记为已修改,并且应调用其保存方法。
if mbo.getOwner() is not None and mbo.isModified():
mbo.getOwner().modify()
您可以使用子对象上的属性启动点获得相同的结果。
如果您想根据子数据触发父对象的保存过程,这将很有用。
Automation Script Object launch point is set to parentMbo. Trigger is upon save, currently happening is when i make changes in childMbo then save() the parentMbo, it will not setValue in 'Description' attribute. I need to change parentMbo first before the changes take effect. Here's my sample code:
triggerInvoke = False
childMbo = mbo.getMboSet("RELATEDTICKET")
if childMbo is not None:
triggerInvoke = True
if triggerInvoke == True:
mbo.setValue("DESCRIPTION", "Invoke")
我对 WO/Tasks 层次结构有类似的要求。这是一个适合您的示例:
假设您在保存事件之前的子对象上有一个对象启动点。此代码应将所有者 mbo 标记为已修改,并且应调用其保存方法。
if mbo.getOwner() is not None and mbo.isModified():
mbo.getOwner().modify()
您可以使用子对象上的属性启动点获得相同的结果。
如果您想根据子数据触发父对象的保存过程,这将很有用。