Overriding NetSuite calculated tax amount on Vendor Credits using SuiteTalk SOAP api - netsuite

I have a question regarding overriding NetSuite auto calculated tax amount on Vendor Credits using SOAP and appreciate your help.
Background
Our application is working with legacy tax feature of NetSuite where Tax Codes can be specified per Expense lines and NetSuite auto calculates tax amount. For example, assuming a subsidiary with Australian tax nexus, when a tax code of 10% is specified for a line with amount 100$, NetSuite calculates tax as 10$. However, the NetSuite user interface also allows overriding that amount by user. For example, if the tax amount on actual user's document is 9.99$, user can override that value in the UI. We are trying to perform similar overriding operation using SOAP API. Since this is possible in the UI, I assume it should also be possible on the API.
editing tax total in the UI
I performed similar operation for Vendor Bill successfully by first creating the Vendor Bill and then updating the transaction by specifying the taxTotal field: taxTotal schema field.
However, trying the similar operation for Vendor Credits was unsuccessful. There is no taxTotal field on Vendor Credit schema, and using the only similar field which was userTaxTotal did not work.
I was wondering is it possible to accomplish this using the SOAP API for Vendor Credits?
Thanks for your help.
This xml code shows the request that we are sending to create the Vendor Credit. As a result, NetSuite creates a Vendor Credit with 110$ (10$ for tax is auto calculated by NetSuite for the given tax code).
<SOAP-ENV:Header>
<ns4:tokenPassport xsi:type="ns3:TokenPassport">
<!--authentication properties-->
</ns4:tokenPassport>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns2:upsert>
<ns2:record xsi:type="ns1:VendorCredit" externalId="5A8B18E92971B6F31832B0AED866EF95">
<ns1:account internalId="176"/>
<ns1:tranId>CRED_JAN26_2023_T1</ns1:tranId>
<ns1:entity internalId="1552"/>
<ns1:currency internalId="1"/>
<ns1:tranDate>2023-01-01T00:00:00</ns1:tranDate>
<ns1:postingPeriod internalId="382"/>
<ns1:memo/>
<ns1:subsidiary internalId="7"/>
<ns1:expenseList>
<ns1:expense>
<ns1:account internalId="38"/>
<ns1:amount>100</ns1:amount>
<!-- tax code corresponding to 10 percent -->
<ns1:taxCode internalId="1044"/>
<ns1:memo/>
<ns1:department internalId="11"/>
<ns1:class internalId="13"/>
<ns1:location internalId="7"/>
</ns1:expense>
</ns1:expenseList>
</ns2:record>
</ns2:upsert>
</SOAP-ENV:Body>
and here is the update request we are sending to update the tax total:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:purchases_2022_1.transactions.webservices.netsuite.com" xmlns:ns2="urn:messages_2022_1.platform.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="urn:core_2022_1.platform.webservices.netsuite.com" xmlns:ns4="ns">
<SOAP-ENV:Header>
<ns4:tokenPassport xsi:type="ns3:TokenPassport">
<!--authentication properties-->
</ns4:tokenPassport>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns2:update>
<ns2:record xsi:type="ns1:VendorCredit" externalId="5A8B18E92971B6F31832B0AED866EF95">
<ns1:userTaxTotal>9.99</ns1:userTaxTotal>
</ns2:record>
</ns2:update>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Although this doesn't fail, it does not change the value of tax total.

In SuiteTalk SOAP, the tax total fields are read only. You have to set the taxRate1 and taxRate2 fields to update the tax rates. While I have not tried it before since most of the implementations I have worked on use avalara, you may also be able to try the tax1Amt field. Depending on how you have configured taxes (and if there are third party tax integrations like avalara) you may also have to configure a custom taxCode that is amenable to being overridden.

Related

Search payment records information in Netsuite using Suitelet

Need to get payment data from Transaction >> Payable >> Pay single vendor form and create a data file. This has been done with an eventscript (add button), a clientscript and a Suitelet by searching currentRecord data from client script to Suitelet and generated a file. However, searching Transaction record type could not get payer payment department and cost center data as I know. So any advice and recommendation from Netsuite experts on how can get these payer data from Netsuite with the existing Transaction information on the Bill Payment form, like payment check number, entity id, transaction number, etc ?
When using the N/search module the following 3 tools are invaluable for retrieving data from netsuite transactions.
Netsuite records browser (shows all of the fields, available search filters, and joins ect.)
https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_1/script/record/vendorpayment.html
Another great tool is an extension called Netsuite Field Explorer developed by Michoel Chaikin
you can also turn on field ids in your account by navigating to Home->Set preferences->General tab->Set defaults->Show internal ids
(This will show the field id when you click on the field "What is this?" link directly on the record)
between the three you should be able to get everything you need to run a search and retrieve the data you are looking for.
Depending on your needs you can either search.create (return multiple records) or search.lookupfield(return a single record)

Why can't I change the printing type of blanket purchase orders on netsuite

I'm attempting to create a custom advanced PDF for blanket purchase orders, yet when I go to the blanket purchase order's transaction form I can't change the printing type to be advanced. Is there any way I can do this? Below is a screenshot of the blanket purchase order's transaction form after clicking "customize"
I haven't tried this but it is likely because a blanket purchase order isn't meant to be seen by a customer. When you use the blanket purchase order feature you will still create real Purchase Orders when the Blanket PO is activated. You should be able to set the form for those and so make use of the Advanced HTML/PDF forms for the actual POs.
If you need to send one over (e.g. for approval) the records are fully scriptable which means you can create your own 'Print' button that triggers a Suitetlet to print the Blanket PO using a BFO template.

SUITETALK- Netsuite searchAdvanced gives line price in base currency

Can anyone please help us with this?
We are using Netsuite advanced search to pull sales order for different subsidiary. We are able to get all the line items(except tax itmes) but its consists the amount in base currency. Is there any way we can get response with exact amount visible in UI.
Also Its very hard to understand the basic of Netsuite SUITE TALk- SOAP. Do you recommend any resources that will ease learning?
Thanks
Just an update with this question, with Advanced search we are able to get the foreign currency of Subsidiary using fxCost in columns But line items doesn't have this option. This causes whole another problem for us. Then we decided to use SAVED SEARCH. Saved search provides us feature to disable foregin currency just by choosing CONSOLIDATED EXCHANGE RATE to none. We are using saved search ID in the Advanced search paramater ie using savedSearchScriptId from Netsuite Schema.
Hope it would be helpful to anyone who is strugglign with this kind of issue.
Thanks
For tax line in fx currency, prefer to do Tax Amount/exchange rate.

AdMob EARNINGS (USD) value is not the real value

We use the following AdSense Management API to get AdMob revenue, but the revenue we get from is 1/100 smaller than the actual value on AdMob dashboard.
This makes me think that there is some setting we need to consider in the API request?
https://developers.google.com/adsense/management/v1.4/reference/reports/generate
response = ad_sense.generate_report(date.to_s, date.to_s,
metric: %w[CLICKS EARNINGS INDIVIDUAL_AD_IMPRESSIONS],
dimension: %w[APP_ID APP_PLATFORM AD_UNIT_NAME AD_UNIT_ID DATE COUNTRY_CODE],
currency: 'USD',
use_timezone_reporting: true)
Response: $12.87
True value: $1,287
The currency code on the dashboard is USD.
Thank you for the help!
You can leave off currency so that the API report will use the account's default. That's worth a shot just to be sure that the currencies are the same.
It's hard for me to compare the two reports since I don't know what parameters are set on the UI report, but I would recommend checking that all the dimensions and filters are the same. Certain dimensions can lead to double-counting report data, like this example with custom channels.
Finally, I would second Maksym's advice to try the new AdMob API for reporting. It's designed to give you reports more in line with the AdMob UI.
It could depend on the account default setting (I.e., currency). You have mentioned that request and dashboard uses USD, but I think it worth to
check.
To check AdMob's account defaults, you need:
Login to AdMob UI (admob.google.com);
Go to Settings -> Account Information;
Check the default reporting currency.
In case all set correct, you can try an AdMob API to get AdMob related reports. It works well to me.

Cannot Create Sales Order using Dell Boomi

I am trying to integrate Salesforce opportunity to netsuite sales order using dell boomi. I keep getting error INVALID_TRANS_TYP . I have given values to all mandatory fields in netsuite. ANy have any idea about what i am missing
Netsuite Response:
<Result>
<id></id>
<success>false</success>
<errors>
<error>
<statusCode>INVALID_TRANS_TYP</statusCode>
<message>Transaction type specified is incorrect.</message>
<type>ERROR</type>
</error>
</errors>
</Result>
While I'm not knowledgeable about Boomi (I use JitterBit because of the Boomi limitations), I can say that that is a standard NetSuite error. What is Boomi sending to NetSuite? Look in Setup > Integration > Web Servies Usage Log. Find the action that corresponds with your attempt. Then check the request file. That is the actual request that NetSuite receives.
In my instances I see the following record type, and I've never had that error message come up. If yours is not the same, that may be the issue.
<record xsi:type="tranSales:SalesOrder" externalId="0063800000kRhshAAC" xmlns:tranSales="urn:sales_2016_2.transactions.webservices.netsuite.com">
Hope that helps out some...
I know you posted this years ago but for anybody else that stumbles upon this...
I would make sure you have the correct sales order Internal ID and not just the sales order number. This is a common mistake with Netsuite. If you go to the URL you can see the internal id at the end of the resource.

Resources