on 2015 Jul 22 8:39 AM
Hello Experts ,
We are currently running on SAP Sourcing /CLM 10 . We are using project module with supplier tab . Currently have a requirement for adding the supplier(s) in supplier tab of project via script ( instead of adding manually , needs to be added via script while saving the project ) . The code we are trying is below but not working .
While saving the project document no error is appearing but supplier is also not appearing under supplier tab . Can you please guide ?
supplierContactColl = doc.getVendorList();
StandardVendor=doc.getVendorList().create();
StandardVendor.setUniqueName("VEN-0000002");
StandardVendor.setDisplayName("ABC Ltd");
StandardVendor.setContactEmail("seraka@xx.com");
The code is triggered on Project document and saving event .
Here , we wanted to hard code a supplier to be added in supplier tab . The supplier is existing in CLM . Once we have the above code working , we need to add supplier dynamically on saving event .
Hi Sudipta,
It is not recommended to set the values in POST_SAVE Event, changes will not reflect to the opened document. Moreover this event occurs when all the vaidation is done and doc is saved in the DB. Try to move your code to Validate event script and check. It should work.
Hope it helps!
Best,
Kushagra A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sudipta,
Please see the below code:
supplierContactColl = doc.getVendorList();
StandardVendor=supplierContactColl .create();
StandardVendor.setUniqueName("VEN-0000002");
StandardVendor.setDisplayName("ABC Ltd");
StandardVendor.setContactEmail("seraka@xx.com");
supplierContactColl .add(StandardVendor);
Hope it helps!
Best,
Kushagra A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.