Change Primary Key of Products Module

Hi I am looking for a way to change the primary key of the Products Module to be the product code instead of the product name. Is this possible?

You should describe your request/issue a little bit more. Is hard for us to help you with so little information.

Now if you want to change the name of the product, you should create a Workflow or Logic hook to change the name value based on what ever parameters you want.

Thanks,

BrozTechnologies

My apologies, I didn’t explain it well. We constantly are updating our products and importing new products. Unfortunately when we do, if the name doesnt match(lower/upper case) because its been changed and we import them in, SuiteCRM looks for matching names and will update those which has the SAME EXACT name. But our issue is that exactly, the product names change so it causes alot of duplicates. And when removing duplicates sometimes the originals are being deleted so now anything linked with that product is missing that linked product! If it would update the record based off the product code instead, by matching the product code and then updating the rest of the information accordingly.

Thanks for providing more details.

Aldo it looks complicated, I think the solution is to standardize imports. By that I mean to define a process on how to prepare files before importing.

SuiteCRM created an unique ID when a product is created. Based on that you can download your existing list of products and modify whatever you want on then before importing updates. That will ensure your import is unique.

To make sure all is good I will recommend you to import new products independently to make sure you don’t create duplicated.

It might look complicated but it will save you time in the long term because you won’t need to waste your time reviewing records in SuiteCRM.

Thanks,

BrozTechnologies

Okay thank you, we will have to standardize how we import. Appreciate it!

You can put your own code into the id, you know? You don’t have to use the SuiteCRM-issued GUID’s, it can be any format as long as its unique.