Cannot Create Supplier Users via Agile Java SDK
I am unable to create the Supplier User in Agile PLM via SDK. I am setting the ATT_SUPPLIER parameter with Supplier name as documented in SDK documentation.
However, I am gettting exception.
And can I update user’s ATT_SUPPLIER post user creation using setValue() operation on user.
Exception in thread “main” com.agile.util.exception.CMAppException: Invalid parameter.
Error code : 60018
Error message : Invalid parameter.
It shouldn’t be an issue actually. Tried with sample code with existing supplier as well as with creating a new supplier and it worked all fine.
In this sample, Supplier user mak1 is created with Supplier Number 10092.
Just verify in the UserConstants.ATT_SUPPLIER field, you should pass Supplier_Number instead of Supplier name.
HashMap<Integer, String> supplierUser = new HashMap<>();
IUser supUser = (IUser) m_session.createObject(UserConstants.CLASS_USER, supplierUser);
I am not totally clear about your requirement here. Based on your comments, my understanding of your issue is as below. Let me know:
You are able to set supplier while creating User but have having issues while trying to set a different supplier?