Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8511

Re: TaxCode assignment in Sales Order document lines with DI API or DI Server API

$
0
0

Hi Victor,

 

First of all you need not to set the value for DocTotal if you are using DI API object. So you need to remove this line:

 

orderDoc.DocTotal = 215;

 

Secondly make sure Tax Code T1 exist. I doesn't have the Australia Localization to test. But on other locations your code is working fine for me. And I am able to set the Tax Code as I want.

 

Also use this line at the very end of your code.

 

 

try

            {

                int ith = 0;

                ith = orderDoc.Add();

 

 

                if (ith != 0)

                {

                    int irrcode;

                    string errmsg;

                    SBO_Company.GetLastError(out irrcode, out errmsg);                  

                }

            }

 

 

Hope it helps.

 

 

Thanks & Regards

 

Ankit Chauhan


Viewing all articles
Browse latest Browse all 8511

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>