Due to data discrepancy, I have to update the vendor IDs. So if I update the vendor id on vendTable from backend, do I need to update the reference tables too or just updating at VendTable would fulfill the problem?
Hi, You are referring to renaming a primary key. If its few Vendors then I would suggest to Use rename functionality in Record Info as mentioned in below article. Updating primary key from back-end can be risky and can cause Database Synchronization or Data corruption issues. Yes, I think you have to update vendor account in all tables where its used.
subscription.packtpub.com/.../renaming-the-primary-key
Hi Mohit,
Thanks for your reply. Do you have any idea if using the script in the link you shared will update all the reference tables?
I have tested from front end using Rename functionality and its updating in other tables as well. You can use the script for one vendor and check if Vendor account is updated in other tables like VendTrans.
It might update correctly as the description of renamePrimaryKey method is 'Renames the foreign keys in other tables according to the change of the corresponding primary key'.
Thanks a lot Mohit . Really appreciate.
Please let us know if it works and mark answer Verified, so it can help someone in future.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,100
André Arnaud de Cal... 890 Super User 2025 Season 2
Sohaib Cheema 633 User Group Leader