on 03-29-2012 8:02 AM
Hi Sourcing Gurus,
How can we(Code to) obtain the Supplier Number & Supplier Name from a Master Agreement or Agreement. I need these details in Script definition while saving the Master Agreement/Agreement or while changing the Supplier Contact which is under Supplier Info tab.
Thanks,
Ritik
Hi Ritik,
Try this code
supplierContactNumber=doc.getVendorAcctNum();
vendorName = doc.getFieldMetadata("VENDOR").get(doc).getDisplayName(session);
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ritik,
Once you populate the supplier primary contact and click on done and open the MA again . you will see the supplier primary contact field changing to supplier primary contact in Vendor. The vendor that get displayed there is the vendor field. So its already pulled by Supplier contact itself.Just verify and let me know if u face issue.
Regards,
uday
Hi Uday,
Sorry i was in transit, so could not reply in time . Thanks a lot for your help Uday.
I tried the code that you sent. To confirm whether the Code is pulling the correct Vendor Number and Name , what i am trying to do is , after getting the Vendor Number through the code
supplierContactNumber=doc.getVendorAcctNum();
I am trying to set this value in Supplier Primary Contact Number field through code
doc.setVendorAcctNum(supplierContactNumber);
But for some reason the value is not coming in Supplier Primary Contact Number field. I tried to hard code the value, but still its not showing.
Any idea , why i am facing this issue.
Thanks,
Ritik
Hi Uday,
I checked this , the problem was with the Scripting Context Field Data Edit. It seems there is some bug with Field Data Edit. When I tried the same with Document Life Cycle Event, it worked. The only issue left is its not pulling the Vendor Number. The vendor number is coming blank.
When i am going to a Supplier i can see a supplier ID, is the supplier ID is the Vendor Number?
P.S. - Just want to confirm , is following is the right way to set a value to a custom extension
doc.getExtensionField(EXTENSION_NAME).set(value);
Thanks again for your help,
Ritik
Hi Uday,
Thanks Uday for your constant help on this issue.
I assume when you try to set any value on the Custom Extension field , the document will be automatically go in edit mode.
In my case Supplier ID is nothing but the Supplier Number. This is the Supplier Number which gets generated when you create a Supplier in eSourcing or the Supplier Number that we import from ECC.
Thanks,
Ritik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.