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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

taPOLine using default AP account despite being told otherwise

(0) ShareShare
ReportReport
Posted on by 75,848 Moderator

I have a routine that inserts purchase orders using taPOHdr and taPOLine. All is fine except the IVIVINDX value on the PO line. All items are non-inventory and this is set in the call to taPOLine. The ACTINDX value is sent down as well however what gets written is the default AP account.  Is there a way to stop this? If you enter a PO in GP it uses this account as well.

*This post is locked for comments

I have the same question (0)
  • MG-16101311-0 Profile Picture
    26,225 on at

    Have you checked the overall Posting Accounts? Administration > Setup > Posting > Posting Accounts. Click the Display filter to select Inventory, then verify the Inventory Control account.

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    Yes, it only does this on the initial insert. If I do the insert again it corrects it to the value I sent down. I noticed they have set the AP account on their vendors. here is no reason for that as the only have one AP account. Project Accounting is installed here but the account GP is pulling is none of the accounts on the cost category. I am going to try do this in TWO and see how it behaves.

  • Mick Egan Profile Picture
    3,561 on at

    Richard,

    You could use the POLInePost and add some custom logic to update the IVIVINDX account to your required account.

    Mick

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    Mick, can you please provide a link to detailed information about this procedure? I am not finding it along with taPOHdr and taPOline.

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    Mick, I am looking at taPOLinePost. All it does is take all the parameters for POLine and returns a zero. It does not do anything. I am still going to need to call taPOLine. Are you saying I should call taPOLne first and have it put the wrong value for IVIVINDX and then come along with taPOLinePost and modify it to update IVIVINDX to the correct account? In this case the insert is for a PA project so I can pull the correct account from the PA cost category.

  • Srini Ramidi Profile Picture
    2 on at

    Hi Richard,

    YES you can modify "taPOlinePost" procedure to pull the correct account from PA Cost Category and update the inserted record.

    Best,

    Srini

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    I must be missing something here. This is all that is in taPOLinePost. I already have the correct IVIVINDX value that I send down to taPOLine. Upon initial insert taPOLine changes it and if I do a second insert it updates it to the correct value. I do not see how this routine is going to correct that. Please explain.

    CREATE PROCEDURE [dbo].[Tapolinepost] @I_vPOTYPE                   SMALLINT,
                                          @I_vPONUMBER                 CHAR(17),
                                          @I_vDOCDATE                  DATETIME,
                                          @I_vVENDORID                 CHAR(15),
                                          @I_vLOCNCODE                 CHAR(10),
                                          @I_vVNDITNUM                 CHAR(30),
                                          @I_vITEMNMBR                 CHAR(30),
                                          @I_vQUANTITY                 NUMERIC (19,
    5),
                                          @I_vQTYCANCE                 NUMERIC (19,
    5),
                                          @I_vFREEONBOARD              SMALLINT,
                                          @I_vREQSTDBY                 CHAR(20),
                                          @I_vCOMMNTID                 CHAR(15),
                                          @I_vCOMMENT_1                CHAR(50),
                                          @I_vCOMMENT_2                CHAR(50),
                                          @I_vCOMMENT_3                CHAR(50),
                                          @I_vCOMMENT_4                CHAR(50),
                                          @I_vREQDATE                  DATETIME,
                                          @I_vRELEASEBYDATE            DATETIME,
                                          @I_vPRMDATE                  DATETIME,
                                          @I_vPRMSHPDTE                DATETIME,
                                          @I_vNONINVEN                 SMALLINT,
                                          @I_vIVIVINDX                 INT,
                                          @I_vInventoryAccount         VARCHAR(75),
                                          @I_vITEMDESC                 CHAR(100),
                                          @I_vUNITCOST                 NUMERIC (19,
    5),
                                          @I_vVNDITDSC                 CHAR(100),
                                          @I_vUOFM                     CHAR(8),
                                          @I_vPurchase_IV_Item_Taxable SMALLINT,
                                          @I_vPurchase_Item_Tax_Schedu CHAR(15),
                                          @I_vPurchase_Site_Tax_Schedu CHAR(15),
                                          @I_vBSIVCTTL                 SMALLINT,
                                          @I_vTAXAMNT                  NUMERIC (19,
    5),
                                          @I_vBCKTXAMT                 NUMERIC (19,
    5),
                                          @I_vLanded_Cost_Group_ID     CHAR(15),
                                          @I_vPLNNDSPPLID              SMALLINT,
                                          @I_vSHIPMTHD                 CHAR(15),
                                          @I_vBackoutTradeDiscTax      NUMERIC (19,
    5),
                                          @I_vPOLNESTA                 SMALLINT,
                                          @I_vCMMTTEXT                 VARCHAR(500),
                                          @I_vORD                      INT,
                                          @I_vCUSTNMBR                 CHAR(15),
                                          @I_vADRSCODE                 CHAR(15),
                                          @I_vCMPNYNAM                 CHAR(64),
                                          @I_vCONTACT                  CHAR(60),
                                          @I_vADDRESS1                 CHAR(60),
                                          @I_vADDRESS2                 CHAR(60),
                                          @I_vADDRESS3                 CHAR(60),
                                          @I_vCITY                     CHAR(35),
                                          @I_vSTATE                    CHAR(29),
                                          @I_vZIPCODE                  CHAR(10),
                                          @I_vCCode                    CHAR(6),
                                          @I_vCOUNTRY                  CHAR(60),
                                          @I_vPHONE1                   CHAR(21),
                                          @I_vPHONE2                   CHAR(21),
                                          @I_vPHONE3                   CHAR(21),
                                          @I_vFAX                      CHAR(21),
                                          @I_vPrint_Phone_NumberGB     SMALLINT,
                                          @I_vCURNCYID                 CHAR(15),
                                          @I_vProjNum                  CHAR(15),
                                          @I_vCostCatID                CHAR(15),
                                          @I_vLineNumber               INT,
                                          @I_vUpdateIfExists           SMALLINT,
                                          @I_vNOTETEXT                 VARCHAR(8000)
    ,
                                          @I_vRequesterTrx             SMALLINT,
                                          @I_vUSRDEFND1                CHAR(50),
                                          @I_vUSRDEFND2                CHAR(50),
                                          @I_vUSRDEFND3                CHAR(50),
                                          @I_vUSRDEFND4                VARCHAR(8000)
    ,
                                          @I_vUSRDEFND5                VARCHAR(8000
    ),
                                          @O_iErrorState               INT output,
                                          @oErrString                  VARCHAR(255)
    output
    AS
        SET nocount ON

        SELECT @O_iErrorState = 0

        RETURN ( @O_iErrorState )  

  • Srini Ramidi Profile Picture
    2 on at

    As you are saying you already passing the correct IVIVINDX ,Change the Create to Alter Procedure and add the update script something like below:

    SELECT @O_iErrorState = 0

    UPDATE POP10110 SET INVINDX=@I_vIVIVINDX WHERE PONUMBER=@I_vPONUMBER  AND ORD=@I_vORD

    RETURN ( @O_iErrorState )  

    You might need to update POP10500.INVINDX as well.

    Best,

    Srini

  • Verified answer
    Mick Egan Profile Picture
    3,561 on at

    Richard,

    As Srini's post mentions you can add the custom logic to ensure your parameter remains in place.

    The custom stored procedures can be found in the econnect directory, similar to : C:\Program Files (x86)\Microsoft Dynamics\eConnect 13.0\Custom Procedures\PurchaseOrderProcessing.

    The taPOLinePost automatically runs after the taPOLine.

    You just need to ensure the Logic is documented, as the stored procedure might be overridden during upgrades, and needs to be re-created.

    Mick

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    That is something similar to what I am already doing. It just seems very odd that I can send down values for all the other fields and those values are left alone. However, this value follows some rule of GP. I am passing down the PA cost category so it is missing this fact. Thanks for the tip.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans