Hello,
Their is a way to prenvent child asset from following the parent asset when it is moved to another location when i use the Action using the action "MOVE/MODIFIER ASSETS" in ASSET APPLICATION to move the asset or modify the parent asset , so the location of asset childrens will be also modified so i want to prevent this action.
i use a script auto Before Save on the object ASSET :
locMboValue = mbo.getMboValue("LOCATION")
locInitValue = locMboValue.getInitialValue().asString()
locCurrValue = locMboValue.getCurrentValue().asString()
if locInitValue != locCurrValue:
mbo.setValue("LOCATION",locInitValue,MboConstants.NOACCESSCHECK)
childSet = mbo.getMboSet("CHILDREN")
child = childSet.moveFirst()
while(child):
childInitValue = child.getMboValue("LOCATION").getInitialValue().asString()
child.setValue("LOCATION",childInitValue,MboConstants.NOACCESSCHECK)
child = childSet.moveNext()
childSet.save()
childSet.close()
But the script doesn't do anything, the location of assets still changes. maybe the launch point is wrong ?
Can you please help me!
Thanks