cancel
Showing results for 
Search instead for 
Did you mean: 

Soap Execute snap - Account creds in header

jamesv
New Contributor II

I’m building a custom SOAP Execute snap to replace Netsuite snaps to work around a limitation with custom fields in Netsuite snaps that require fields entered to not be null.

I’ve modeled my SOAP envelope after the request that gets logged when I call the Netsuite Update snap, which seems like a good option to handle this, but I don’t seem to be able to authenticate using the attached account.

Is there a way to refer to an Account’s credentials in the SOAP envelope that I can use here? I have a basic SOAP auth account hooked up to the snap but it sure doesn’t seem to want to use it.

EDIT: Just to be clear, manually adding the email and password in the passport is working fine, but is not productionizable for hopefully obvious reason

18 PM

21 REPLIES 21

Have you tried doing this with the 4.16 version of the custom field functionality, where the values are mapped like standard fields in a Mapper in front of the NetSuite snap?

jamesv
New Contributor II

Date types are not parsed properly in custom body fields and thus if you want to use the standard snaps you cannot use null values.

Interesting. Is there a support ticket about that issue?

jamesv
New Contributor II

IIRC I tried to report this as a part of asking for help with a workaround.

I think there was another issue relating to null fields still not being updated properly which is why I also did this. I mean, I asked this over a year ago, lol.

It’s probably worth checking it out as it is definitely still a problem or is at least ticketed - I almost did this workaround again very for a much more complicated series of Netsuite SOAP calls but gave up when I realized I didn’t actually have to change the number of date columns we’re already splitting calls across, and it doesn’t need proper updates as we expect only to create new Netsuite objects using the process.

James, I just tested this. The error is happening on the NetSuite side. I verified that by sending a request via Postman. Here’s the SOAP request (the body of it):

<SOAP-ENV:Body>
    <ns0:update>
        <ns0:record ns2:type="ns1:Job" internalId="481756">
            <ns1:customFieldList>
                <ns4:customField ns4:scriptId="custentity777" ns4:internalId="489" ns2:type="ns4:StringCustomFieldRef">
                    <ns4:value/>
                </ns4:customField>
                <ns4:customField ns4:scriptId="custentity15" ns4:internalId="119" ns2:type="ns4:DateCustomFieldRef">
                    <ns4:value/>
                </ns4:customField>
            </ns1:customFieldList>
        </ns0:record>
    </ns0:update>
</SOAP-ENV:Body>

and the response:

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
soapenv:Body
soapenv:Fault
soapenv:Server.userException
java.text.ParseException: Invalid dateTime format:

<ns1:hostname xmlns:ns1=“WebServices - Axis”>partners002.prod.svale.netledger.com</ns1:hostname>

</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

The other custom field is a string. Setting that to null works fine.