Change property value on client side

Former Member
Former Member
Hello, Im trying to change the value of a property in a Javascript method, but the changes dont apply, i tried :
var inn = aras.IomInnovator;
var item = inn.getItemById("ITEM_TYPE", "9A78BB7E5EC340018DE26D604CB92041");
item.lockItem();
item.setProperty('my_property',new_value);
item.apply();
item.unlockItem();
console.log(item.getProperty('my_property')); //return new_value
  and :
var aml = "<AML><Item type='ITEM_TYPE' id='9A78BB7E5EC340018DE26D604CB92041' action='edit'/><my_property>new_value</my_property></Item></AML>";
inn.applyAML(aml);
  But when i check the item in its grid the property remains unchanged. What am I doing wrong here? Thanks you. Léo
Parents
  • Hi Chris, I have Similar issue while updating Property. I want to update "owned_by_id" for nearly 200 Parts i am using below AML and it showing me success. But changes are not reflecting. Can you help me in this. my input file contains Part id and user identity name. <BatchLoaderPrototype> <Item type="Part" action="edit" version="0" where="item_number='@1'"> <item_number set="value">@1</item_number> <owned_by_id set="value">@2</owned_by_id> </Item> </BatchLoaderPrototype>
Reply
  • Hi Chris, I have Similar issue while updating Property. I want to update "owned_by_id" for nearly 200 Parts i am using below AML and it showing me success. But changes are not reflecting. Can you help me in this. my input file contains Part id and user identity name. <BatchLoaderPrototype> <Item type="Part" action="edit" version="0" where="item_number='@1'"> <item_number set="value">@1</item_number> <owned_by_id set="value">@2</owned_by_id> </Item> </BatchLoaderPrototype>
Children
No Data