I've custom field in Order object where I want to store Carrier and Tracking Number but they can be multiple.

I've come from the background of SugarCRM so what I've done is I'm storing stringified JSON in DB as a string like

"[{carrier:'Defex',tracking_no:12321321321},{carrier:'Defex - International',tracking_no:12321321321}]"

And I'm rendering it as HTML table on the record page.


So is there anything same as this I can do in Salesforce? or do we have an alternative which is present by default and I've not seen those?

1 Answer 1


I think you should be looking at storing the carrier and the tracking in another object altogether and it will lookup to the Order object. This has multiple advantages:

1) The data is very easily readable as the users can see the data as a related list to the order.

2) You can report on the data very easily as it is structured.

3) In case you store them as JSON, then you will have to write / modify custom code every time you want to edit the structure of the JSON. In case of an object you just have to make configuration changes.

  • 1
    Indeed, even I already thought of this but I was given this as a task :D , so maybe I will try convenience. Thanks. Jun 25, 2018 at 5:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .