How to Populate Lookup Fields in Salesforce from NetSuite Data
7 min
you may have a situation where you are importing netsuite records into salesforce and, when those records are created in salesforce, you wish them to have populated lookup fields to already existing salesforce records for example, you might have a custom object "household" and when an invoice is replicated from netsuite to salesforce, you want that invoice to have a lookup to a specific household record this is both possible and straightforward with breadwinner for netsuite to do this, you need the salesforce record id of the parent record to be on that netsuite invoice in a very specific field prerequisites salesforce prerequisites create a custom lookup field on the corresponding breadwinner netsuite record the lookup field should point to the desired parent object the lookup field can have any field label the lookup field must have an api name of bwcl \[parent object] assign permission sets to this field so that salesforce admins can read/write to this field (and anyone else who might need to perform edit actions on this record) optional create a field on the originating object that stores the parent object's record id (this is explained in more detail in the data flow section below) so, in our example, the breadwinner for netsuite object "invoice" would have a lookup to your custom object "household" with an api name of bwcl household c the field label can be whatever you wish the " c" is added by salesforce, so simply calling the api name "bwcl household" will result in the desired api name netsuite prerequisites create a custom field on the netsuite record the field should be a text field the field can have any field name the field must have an api name of bwcl \[parent object] so, for our example, you would create a text field on the netsuite invoice with any field label and a field name of bwcl households the resulting api name in netsuite will be "custbody bwcl households" data flow this flow does not require you to create the netsuite record using breadwinner you could create the record using any third party tool, or even manually simply creating the record or updating it with the field populated is enough however, for the rest of this help article, we presume you are using breadwinner to create the field in netsuite if you are creating the record using breadwinner, then there is one more field that we recommend you create you should create a field on the originating object that stores the record id of what will be the parent record so, in our example, you might create a netsuite invoice from a salesforce opportunity record the opportunity record is the "originating record" and it should have a field (formula, or text) that stores the record id of the household record so, for any given opportunity record, it might have a lookup to the household record you would create a formula that shows the 18 digit record id of that lookup record so it might appear on your records with a value of "a036e00000lrbcbaa0" this is the value you would pass to netsuite when creating the record using breadwinner using our global api https //dev netsuite breadwinner com/ , simply populate the field in netsuite with the desired parent record's 18 digit record id when creating the record using breadwinner's guided wizard, use our custom url to pass the record id to the desired field so there will be a line in your custom url that looks like \&cf text \[netsuite api name]=formula field c in our example from above, the field would look like \&cf text custbody bwcl household=formula field c sync times when creating the record in netsuite using breadwinner, the netsuite record that is created/updated will be replicated back to breadwinner live (within a few seconds) and the lookup will be populated immediately if the record is created in netsuite manually, or through a third party tool, then when breadwinner checks netsuite for regular updates (usually every 5 minutes, though this depends on how you have configured breadwinner) then the lookup should be populated at that time professional services your salesforce admin or consultant should be able to accomplish this within an hour or so of work however, if you need professional services, we would be glad to refer you to salesforce consultants that breadwinner has partnered with
