10-25-2023 11:49 PM
Hello,
I am reading data from Salesforce for a couple of fields and using NetSuite Update Snap, to update the record for those fields in the NetSuite Customer object.
However, While updating records in NetSuite (System Notes) what I have observed is every time any Salesforce-specific field value is changed let's say for Invoice_Preference__c from "Other" to "Email", Then along with "Invoice Preference", the "Address field" in NetSuite (System Notes) is also logged as Create type.
So why is this happening only for the Address field and how can it be avoided?
Salesforce Input data
[
{
"record": {
"companyName": "GTML2C-483_test1",
"customFields": {
"Invoice Preference": {
"internalId": 1
},
"SFDC ID": "0015Ed9AE",
"UCID": "101575",
"PO required": false,
"Multiple Invoice Emails": false,
"Additional Invoice Emails": null
},
"parent": {
"externalId": null
},
"currency": {
"internalId": 1
},
"phone": null,
"addressbookList": {
"addressbook": [
{
"addressbookAddress": {
"addr1": "Ring 1",
"city": "Vienna",
"zip": "1010",
"state": null,
"country": "_austria"
},
"defaultBilling": "true",
"defaultShipping": "false"
},
{
"addressbookAddress": {
"city": "Vienna",
"zip": "1010",
"state": null,
"addr1": "Ring 1",
"country": "_austria"
},
"defaultBilling": "false",
"defaultShipping": "true"
}
],
"replaceAll": "false"
},
"email": "v.xyz@xyz.com",
"externalId": "0015Ed9AE",
"fax": null,
"accountNumber": "2974",
"comments": null,
"vatRegNumber": null,
"taxItem": {
"name": null
},
"terms": {
"internalId": null
},
"subsidiary": {
"internalId": 1
},
"internalId": "28248"
}
}
]
NetSuite Update Snap Output
[
{
"soapenv:Body": {
"@xmlns:soapenv": "http://schemas.xmlsoap.org/soap/envelope/",
"@xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"updateResponse": {
"@xmlns": "urn:messages_2020_1.platform.webservices.netsuite.com",
"writeResponse": {
"platformCore:status": {
"@xmlns:platformCore": "urn:core_2020_1.platform.webservices.netsuite.com",
"@isSuccess": "true",
"platformCore:statusDetail": {
"platformCore:afterSubmitFailed": "false"
}
},
"baseRef": {
"@xmlns:platformCore": "urn:core_2020_1.platform.webservices.netsuite.com",
"@externalId": "0015Ed9AE",
"@internalId": "28248",
"@type": "customer",
"@xsi:type": "platformCore:RecordRef"
}
}
}
},
"original": {
"record": {
"companyName": "GTML2C-483_test1",
"customFields": {
"Invoice Preference": {
"internalId": 1
},
"SFDC ID": "0015Ed9AE",
"UCID": "101575",
"PO required": false,
"Multiple Invoice Emails": false,
"Additional Invoice Emails": null
},
"parent": {
"externalId": null
},
"currency": {
"internalId": 1
},
"addressbookList": {
"addressbook": [
{
"addressbookAddress": {
"addr1": "Ring 1",
"city": "Vienna",
"zip": "1010",
"state": null,
"country": "_austria"
},
"defaultBilling": "true",
"defaultShipping": "false"
},
{
"addressbookAddress": {
"city": "Vienna",
"zip": "1010",
"state": null,
"addr1": "Ring 1",
"country": "_austria"
},
"defaultBilling": "false",
"defaultShipping": "true"
}
],
"replaceAll": "false"
},
"email": "v.xyz@xyz.com",
"externalId": "0015Ed9AE",
"accountNumber": "2974",
"taxItem": {
"name": null
},
"terms": {
"internalId": null
},
"subsidiary": {
"internalId": 1
},
"internalId": "28248",
"customFieldList": {
"customField": [
{
"scriptId": "custentity_invoice_preference",
"internalId": "2769",
"type": "SelectCustomFieldRef",
"value": {
"internalId": 1
}
},
{
"scriptId": "custentity_sfdc_id",
"internalId": "2759",
"type": "StringCustomFieldRef",
"value": "0015Ed9AE"
},
{
"scriptId": "custentity_ucid",
"internalId": "4499",
"type": "StringCustomFieldRef",
"value": "101575"
},
{
"scriptId": "custentity_tri_po_required",
"internalId": "3336",
"type": "BooleanCustomFieldRef",
"value": false
},
{
"scriptId": "custentity_mult_invoice_emails",
"internalId": "2754",
"type": "BooleanCustomFieldRef",
"value": false
}
]
},
"nullFieldList": {
"name": [
"phone",
"fax",
"comments",
"vatRegNumber",
"custentity_addl_invoice_emails"
]
}
}
}
}
]
NetSuite Update SNAP
Salesforce_NetSuite Field Mapping
NetSuite System Notes for reference:
Thanks!
@SpiroTaleski @og_integration
11-05-2023 10:59 PM
Hi @Vikas2022 Before updating , pull the internal id of existing address and try to update.