Web Address field can be populated in WS by concatenating the original url by 'http://' +actual url or 'https://' + actual URL.
Sample SOAP Request and Response:
SOAP Request:
<soapenv:Body>
<platformMsgs:add
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s0="urn:relationships_2009_1.lists.webservices.netsuite.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:platformMsgs="urn:messages_2009_1.platform.webservices.netsuite.com"
xmlns:platformCore="urn:core_2009_1.platform.webservices.netsuite.com">
<platformMsgs:record xsitype="s0:Customer">
<s0:entityId>Entity213</s0:entityId>
<s0:isPerson>false</s0:isPerson>
<s0:companyName>CompanyEileen123</s0:companyName>
<s0:url>https://www.sancheztruckinginc.com</s0:url>
<s0:billPay>false</s0:billPay>
</platformMsgs:record>
</platformMsgs:add>
</soapenv:Body>
SOAP Response:
<soapenv:Envelope
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">
<soapenv:Header>
<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2009_1.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_TSTDRV329736_072220091536502849871978276_40706c2</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<addResponse xmlns="urn:messages_2009_1.platform.webservices.netsuite.com">
<writeResponse>
<status isSuccess="true" xmlns:platformCore="urn:core_2009_1.platform.webservices.netsuite.com" />
<baseRef internalId="495" type="customer" xsitype="RecordRef"
xmlns:platformCore="urn:core_2009_1.platform.webservices.netsuite.com" />
</writeResponse>
</addResponse>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Body>
<platformMsgs:add
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s0="urn:relationships_2009_1.lists.webservices.netsuite.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:platformMsgs="urn:messages_2009_1.platform.webservices.netsuite.com"
xmlns:platformCore="urn:core_2009_1.platform.webservices.netsuite.com">
<platformMsgs:record xsitype="s0:Customer">
<s0:entityId>Entity213</s0:entityId>
<s0:isPerson>false</s0:isPerson>
<s0:companyName>CompanyEileen123</s0:companyName>
<s0:url>https://www.sancheztruckinginc.com</s0:url>
<s0:billPay>false</s0:billPay>
</platformMsgs:record>
</platformMsgs:add>
</soapenv:Body>
SOAP Response:
<soapenv:Envelope
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">
<soapenv:Header>
<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2009_1.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_TSTDRV329736_072220091536502849871978276_40706c2</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<addResponse xmlns="urn:messages_2009_1.platform.webservices.netsuite.com">
<writeResponse>
<status isSuccess="true" xmlns:platformCore="urn:core_2009_1.platform.webservices.netsuite.com" />
<baseRef internalId="495" type="customer" xsitype="RecordRef"
xmlns:platformCore="urn:core_2009_1.platform.webservices.netsuite.com" />
</writeResponse>
</addResponse>
</soapenv:Body>
</soapenv:Envelope>
But why is it that 'Web Address' accepts just simple www.netsuite.com in the User Interface, why is there a need to concatenate it with either http:// or https:// if populated via WS?
- Plain and simple. There is an internal Field Changed script that triggers whenever Web Address field is populated in the UI, it adds http:// to every URL that starts with www and just allow urls that start with https:// or http://
No comments:
Post a Comment