Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

econnect procedures PRE vs POST

(0) ShareShare
ReportReport
Posted on by 330

I have altered the taSOPLinIvcInsertPre procedure in which another procedure fetches a unit price.

when I run the PRE procedure, I can see that it works,  I have the good unit price.  BUt when I run the integration (from sartconnect) it doesn't get the UNitprice found in the PRE procecdure.

Is it possible that the taSOPLineivcinsertPRE procedure doesn't get triggered?

*This post is locked for comments

  • DominicBeland Profile Picture
    DominicBeland 330 on at
    RE: econnect procedures PRE vs POST

    Yes,  I had the DEFPRICING switch ON.

    switched it to OFF.

    thanks!

  • DominicBeland Profile Picture
    DominicBeland 330 on at
    RE: econnect procedures PRE vs POST

    oh wait... I have to check about the DEFPRICING.  indeed, looks like the solution.

  • DominicBeland Profile Picture
    DominicBeland 330 on at
    RE: econnect procedures PRE vs POST

    When I run the PRE procedure, the variable is good:

    unitpricedefault.jpg

    Notice I haven't provided any values for @I_vUNITPRICE.    so the PRE procedures does work and gives us the proper unitprice.

    here's what we added to the PRE:

    declare @oOrigUnitPrice numeric(19,5) ,
             @oOrigUnitPriceRND numeric(19,5)

     select @O_iErrorState = 0  
     
    -- if @I_vUNITPRCE = 0.00
        begin
        EXECUTE [dbo].[JOV_Find_Price_sp]
           @I_vITEMNMBR
          ,@I_vUOFM
          ,@I_vCUSTNMBR
          ,@I_vDOCDATE
          ,@oOrigUnitPrice OUTPUT
          ,@oOrigUnitPriceRnd OUTPUT
          ,@I_vMRKDNPCT OUTPUT
          ,@O_iErrorState OUTPUT


        SET @I_vUNITPRCE = @oOrigUnitPriceRnd

        end
     
     
     
     return (@O_iErrorState)   
    GO

    Looking at the SQL Profiler when running the smartconnect map (and looking at resulting documents in GP), the unit price is 0.  it looks like it's simply getting the "default" value instead of what the PRE procedure should have given it.

    unitpricedefault.jpg

  • Verified answer
    Tim Wappat Profile Picture
    Tim Wappat 5,703 on at
    RE: econnect procedures PRE vs POST

    It will be getting triggered, can you post your pre stored procedure SQL so we can diagnose.

    I'm guessing you may not have assigned the unit price to the unit price variable?

    Also what are you setting the DEFPRICING field to? (Default pricing)

    Tim.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans