<@U5TF1GQ20> Do you know anything about why Netsui...
# general
k
@battk Do you know anything about why Netsuite user event script does not provide me “taxtotal” of the sales order on aftersubmit?
b
you should have access to the same fields and values that were submitted
k
I have full admin access. I did some trouble shooting and there is no totaltax value set. When I did a saved search, it shows the record correctly with the totaltax, is there a way to delay event script?
b
no, just do the search in the user event
k
I ran the search of sales order by Internal ID in my user event script and I got taxtotal blank from my search
let me provide a snippet of my code
n
are you using context.newRecord or have you loaded the record?
b
you will want to make sure you understand what is setting the tax related fields on your sales order
it sounds like something else is modifying fields related to the tax total after submit
☝️ 1
k
@NickSuite Yes I am using context.newRecord
message has been deleted
I also created a saved search of the record and it throws nothing
b
you did not actually share the search related function
k
message has been deleted
I got nothing from the result’s taxtotal
n
I agree with @battk. Can you check the order of execution of your script in the scripted records?
k
This is the result from the saved search from context.newRecord.id
Then i hardcoded the id “3480048” in place or “netsuiteId” and ran the script again. This is the result
@NickSuite where can i find the orders of execution of scripts?
b
the sales order has been modified between when you ran the first search and when you ran the second
find whatever is making that modification
n
In the scripted records @Ken Go to Customization > Scripting > Scripted Records > Sales Order > Find your script and move it to the end of the list if it isn't already.
k
I placed the script at the end, but total tax is still 0
Is there a way for me to create a webhook on Netsuite to send Sales Order that was newly created that is prebuilt into Netsuite?
b
doesnt have to be another user event script that is causing the issue
depending on how well you inspected the system notes, it could be a scheduled or map/reduce script making the changes
more unusually it could be a workflow
making the user event script run last is only effective if you identified the script causing the tax total to change as another user event script
k
I see, because I had it call my custom Webapp that I created for testing, where I would ran another search on Netsuite but it still gave me empty value.
b
you are unlikely to fix the issue unless you identify what it changing the taxes