Hi everyone! Any idea on how to figure out which s...
# suitetalkapi
g
Hi everyone! Any idea on how to figure out which script is creating problems?
You have entered an Invalid Field Value -Infinity.00 for the following field: amount
The amount is being set for a Discount for Sale Item when trying to import a SalesOrder.
Copy code
<ns1:item>
                        <ns1:item type="discountItem" internalId="207963"/>
                        <ns1:description>Reward Points Amount</ns1:description>
                        <ns1:price internalId="-1"/>
                        <ns1:amount>-2.22</ns1:amount>
                        <ns1:isTaxable>false</ns1:isTaxable>
                    </ns1:item>
The weird part - SalesOrder is created:
Copy code
<writeResponse>
                <platformCore:status isSuccess="false" xmlns:platformCore="urn:core_2020_1.platform.webservices.netsuite.com">
                    <platformCore:statusDetail type="ERROR">
                        <platformCore:code>INVALID_FLD_VALUE</platformCore:code>
                        <platformCore:message>You have entered an Invalid Field Value -Infinity.00 for the following field: amount</platformCore:message>
                        <platformCore:afterSubmitFailed>true</platformCore:afterSubmitFailed>
                    </platformCore:statusDetail>
                </platformCore:status>
                <baseRef xsi:type="platformCore:RecordRef" type="salesOrder" externalId="xxx" internalId="xxx" xmlns:platformCore="urn:core_2020_1.platform.webservices.netsuite.com"/>
            </writeResponse>
and I see that it says “afterSubmitFailed” but I have no idea how to figure out which one …
b
first starting place is The Scripted Records Page
check every listed user event script for your error
if you are especially unlucky, you will have to check the workflows too
g
ugh. 40 rows with afterSubmit 😅
can’t locate any errors being thrown 😞
I also checked workflows and 4 are triggered for salesOrder afterSubmit but none even touches “amount”
b
the alternate approach is a Server Script Log
actual errors are thrown at the System level
from there, you can get to the script from the joins on the search
if you are slow or unlucky, you have to use Script Execution Logs