Tuesday, May 19, 2020

#766 OIC for Netsuite --> mapping Custom Fields

Simple scenario here - a custom field in the Customer object, need to be filled when creating a customer.



















I found this out, when I ran the integration, having only mapped, what I thought were the 2 mandatory fields - company and subsidiary --> internal ID.

So now the fun starts -
Where do I find such custom field definitions in Netsuite?















So there is a custom field Customer Type. Valid values are in the following list -












As you can see, B2B has the internalID = 2.
That's the one I want to use.














This is what I need to use in my mapping -

So I'm now good - I have found the custom field, I know the valid value I need to set.

Now to the OIC mapping - I look at the definition of the Target Netsuite Customer -






































Notice the customField section above. No mention of the specific custom field, Customer Type.
This is polymorphic.

Here I consult the Netsuite adapter documentation - essentially the screenshot is somewhat out of date, but the modus operandi remains the same.

























The full doc can be found here

Essentially we need to do the following -




















The result is -















Now to filling these fields -

internalId and scriptId need to be filled -

So from where do I get these values?

Back to the Netsuite UI and the custom field definition -














 script Id = custentity_sail_ef_customer_type














internalId = 1026

Now to the value - I need to set this to 2
as B2B type has the internal Id = 2

















I now test the mapping and validate the custom field mapping result
















Looks good!

I now activate and test -



















I validate in Netsuite -






Next step is to create a Lookup to contain these hard-coded values, thus making it easy to react to change. I leave that step up to you!






No comments: