Hi team,
I hope
you are doing well.
We are using SOAP to retrieve entities from the NetSuite and are getting an error:
Script Security Violation: Unauthorized attempt to edit entity with Administrator role by SuiteScript!
But we are not editing, creating, or deleting entities. Could you please help with this? what is the reason for such an error?
I'm attaching the request and response.
REQUEST:
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:searchPreferences soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns1="urn:messages.platform.webservices.netsuite.com">
<ns2:bodyFieldsOnly xmlns:ns2="urn:messages_2020_1.platform.webservices.netsuite.com">false</ns2:bodyFieldsOnly>
<ns3:returnSearchColumns xmlns:ns3="urn:messages_2020_1.platform.webservices.netsuite.com">false</ns3:returnSearchColumns>
<ns4:pageSize xmlns:ns4="urn:messages_2020_1.platform.webservices.netsuite.com">5</ns4:pageSize>
</ns1:searchPreferences>
<ns5:tokenPassport soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns5="urn:messages_2020_1.platform.webservices.netsuite.com">
<ns6:account xmlns:ns6="urn:core_2020_1.platform.webservices.netsuite.com">**********</ns6:account>
<ns7:consumerKey xmlns:ns7="urn:core_2020_1.platform.webservices.netsuite.com">****************************************************************</ns7:consumerKey>
<ns8:token xmlns:ns8="urn:core_2020_1.platform.webservices.netsuite.com">****************************************************************</ns8:token>
<ns9:nonce xmlns:ns9="urn:core_2020_1.platform.webservices.netsuite.com">**********</ns9:nonce>
<ns10:timestamp xmlns:ns10="urn:core_2020_1.platform.webservices.netsuite.com">***********</ns10:timestamp>
<ns11:signature algorithm="HMAC_SHA256" xmlns:ns11="urn:core_2020_1.platform.webservices.netsuite.com">********************************************</ns11:signature>
</ns5:tokenPassport>
</soapenv:Header>
<soapenv:Body>
<search xmlns="urn:messages_2020_1.platform.webservices.netsuite.com">
<searchRecord xsi:type="ns12:CustomerSearchBasic" xmlns:ns12="urn:common_2020_1.platform.webservices.netsuite.com"/>
</search>
</soapenv:Body>
</soapenv:Envelope>
RESPONSE:
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2020_1.platform.webservices.netsuite.com">
<platformMsgs:nsId>**************************************</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<searchResponse xmlns="urn:messages_2020_1.platform.webservices.netsuite.com">
<platformCore:searchResult xmlns:platformCore="urn:core_2020_1.platform.webservices.netsuite.com">
<platformCore:status isSuccess="false">
<platformCore:statusDetail type="ERROR">
<platformCore:code>SSS_SCRIPT_SECURITY_VIOLATION</platformCore:code>
<platformCore:message>Script Security Violation: Unauthorized attempt to edit entity with Administrator role by SuiteScript!</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
</platformCore:searchResult>
</searchResponse>
</soapenv:Body>
</soapenv:Envelope>
I really appreciate any help you can provide.