Skip to main content

Notifications

Microsoft Dynamics GP forum
Answered

econnect procedures PRE vs POST

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?

  • 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,701 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.

Helpful resources

Quick Links

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284,753 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,302 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans