Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Get GL Account Number based on job number or cost code for purchasing transaction

Posted on by 210

Hi,

Can anyone of you tell me on how to get GL Account Number based on job number or cost code for purchasing transaction.

Thanks,

Jyotshna

*This post is locked for comments

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    RE: Get GL Account Number based on job number or cost code for purchasing transaction

    Okay, but from where does the Job Number or Cost Code originate?  It sounds like you want to map GL distribution accounts to the job number/cost code, correct?

  • Jyotshna Reddy Profile Picture
    Jyotshna Reddy 210 on at
    RE: Get GL Account Number based on job number or cost code for purchasing transaction

    I wrote a stored proc which uses econnect and executes taPMDistribution. Below is the way how I do it, for now I hardcoded the account number but I want to get it based on job number or cost code.

    Exec taPMDistribution

    @I_vDOCTYPE=1

    ,@I_vVCHRNMBR=@VoucherNum

    ,@I_vVENDORID=@VendorId

    ,@I_vDISTTYPE=6

    --,@I_vACTINDX=@ACTINDX

    ,@I_vACTNUMST='10-51-01000-5055'

    ,@I_vCRDTAMNT=0

    ,@I_vDEBITAMT=@LineAmount

    ,@I_vDistRef=''

    ,@O_iErrorState=@ErrState output

    ,@oErrString=@ErrOut output  

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    RE: Get GL Account Number based on job number or cost code for purchasing transaction

    Are you using the Project Accounting or Job Cost module or another 3rd party application for job costing?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans