I am trying to change the permission for Part object but getting errors. Here is the AML I am using to change the permission.
<AML>
<Item type="Part" action="edit" where="item_number='CPR-002'">
<permission_id>708662930B5B484A98C088859500CC42</permission_id></Item>
</AML>
permission_id is valid.
Also tried following code to change the permission based on property ref (community.aras.com/.../). The permission_id doesnt change.
string permissionName="";
permissionName = this.getProperty("description","");
CCO.Utilities.WriteDebug("DebugMsg", "Permission Name =" + permissionName);
//Get the permission item
Item permItem = this.newItem("Permission", "get");
permItem.setProperty("name", permissionName);
permItem = permItem.apply();
if (permItem == null){
CCO.Utilities.WriteDebug("DebugMsg", "Permission with the name not found" ); // I have verified that there is permission with the description name
}
//Set the permission item for the context item
//this.setProperty("permission_id",permItem.getProperty("id"));
this.setPropertyItem( "permission_id",permItem ); // I have tried both the methods without any success
return this;
Any help in this regard is highly appreciated.
Pravin
Hi Pravin,
A couple questions - What version of Aras are you using? Can you confirm that your user has "can change access" permission on the item you're trying to edit? What's the context for the C# method, that is, what triggers the method to run?
Eli
Eli Donahue
Aras Labs Software Engineer