web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

econnect error with TRAdePCT

(0) ShareShare
ReportReport
Posted on by

Hi,

Im trying to import invoices with econnect .   Getting an error on tasophdrivcinsert. 

"You can not pass both a Trade Discount Amount (TRDISAMT) and Trade Discount Percentage (TRADEPC)"    

Not sure how to get arround this.     I am passing in 0 for both of these values.   Any suggestions

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at

    When passing a trade discount, Ensure to pass TRDISAMTSpecified = True. Otherwise make it FALSE.

    Your feedback is highly appreciated,

  • Community Member Profile Picture
    on at

    Im on GP 2010.   I dont see a TRDISAMTSpecified field in the documentation.  Where should this field be placed?

  • Suggested answer
    soma Profile Picture
    24,410 on at

    Set the flag true for below elements to taSopHdrIvcInsert eConnect schema.

    TRDISAMTSpecified = TRUE

    TRADEPCTSpecified = TRUE

    Hope this helps!!!

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Peter,

    Please make sure the customer card is assigned with Trade Discount Percentage. if it is assigned it automatically calculate the amount for the certain sales order. i guess you can pass the Trade Discount Percentage alone.

  • Suggested answer
    soma Profile Picture
    24,410 on at

    Peter,

    These fields are  available in .NET serialization class reference (Microsoft.Dynamics.GP.eConnect.Serialization.dll) for eConnect and used for some specific fields such as TRDISAMTSpecified & TRADEPCTSpecified.

    Try to pass the values for the fields TRDISAMTSpecified = TRUE, TRADEPCTSpecified = TRUE to your integration and let us know if you facing any issues

    For your reference, have a look on the below link.

    dynamicbusinesssolutions.ru/.../ecpg_ch24_apireference1285911.htm

    Hope this helps!!!

  • Community Member Profile Picture
    on at

    Well,  that could be part of the problem.   Im not using .Net.   Im making direct calls to the stored procedure tasophdrivcInsert  (as directed by my boss).    I have used this method before, but dont recall running into this issue.      This procedure does not have the TRADEPCTSpecified field you are specifying.

  • soma Profile Picture
    24,410 on at

    I have tried to pass the values for the Trade Discount & Percentage to taSopHdrIvcInsert  stored procedure on my environment and this was worked fine without any issues.

    Please have a look on the below my sample code.

    declare @return_value varchar
    declare @O_iErrorState varchar
    declare @oErrString varchar
    EXEC @return_value = [dbo].taSopHdrIvcInsert
    @I_vSOPTYPE = 3,
    @I_vSOPNUMBE = N'STDINV2264',
    @I_vBACHNUMB = N'TEST',
    @I_vCUSTNMBR = N'ADAMPARK0001',
    @I_vDOCDATE = N'04/12/2017',
    @I_vLOCNCODE = N'WAREHOUSE',
    @I_vPRSTADCD = N'BILLING',
    @I_vDOCID = N'STDINV',
    @I_vTRDISAMT = 2,
    @I_vUpdateExisting = 1,
    @O_iErrorState = @O_iErrorState OUTPUT,
    @oErrString = @oErrString OUTPUT

    Have you tried to manually create this invoice in GP? If not, create the same in GP and try again.

    Hope this helps!!!

  • Suggested answer
    Community Member Profile Picture
    on at

    Excellent!  My SQL is a bit more complicated as I have to build a dynamic sql string, but your example showed me that I can just omit the tradepct and ti works fine.   Thanks a bunch.

  • Community Member Profile Picture
    on at

    Actually,   Your code sample here does not work.   It returns a result code of * and there is no invoice created in the system.  I am still having the same issue.

  • soma Profile Picture
    24,410 on at

    You are most welcome.

    Note: I have used few fields to the above script. If you want more field pass it to them.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Anthony Beatty Profile Picture

Anthony Beatty 2

#2
CP04-islander Profile Picture

CP04-islander 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans