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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)
Suggested Answer

Posted Approval Entry -G/L Entry

(0) ShareShare
ReportReport
Posted on by

Hello,

 Is technically/Customizing possible to link the Posted Approval Entry table with the G/L Entry to Get fields Entry No. and Document No. in to Posted Approval Entry table.

Thank you and Regards,

Eri

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Alexander Ermakov Profile Picture
    28,096 on at

    The relation between those would be on-to-many, meaning that one posted approval entry might be related to numerous G/L entries. I think it is possible, by adding a field "Posted Approval Entry No." in the G/L Entry table and generate respective logic to het that filled with correct Approval Entry No.

  • Community Member Profile Picture
    on at

    Thank you Alexander for your reply.

    Can you please advise on how do I populate the Document No. in G/L Entry  in to Posted Approval Entry table.

    MoveApprvalEntryToPosted(VAR ApprovalEntry : Record "Approval Entry";ToTableId : Integer;ToNo : Code[20])
    WITH ApprovalEntry DO BEGIN
    IF FIND('-') THEN
    REPEAT
    PostedApprvlEntry.INIT;
    PostedApprvlEntry.TRANSFERFIELDS(ApprovalEntry);
    PostedApprvlEntry."Table ID" := ToTableId;
    PostedApprvlEntry."Document No." := ToNo;
    PostedApprvlEntry."Document No. 2":=GLEntry."Document No."

    PostedApprvlEntry.INSERT;
    UNTIL NEXT = 0;
    ApprovalCommentLine.SETRANGE("Table ID","Table ID");
    ApprovalCommentLine.SETRANGE("Document Type","Document Type");
    ApprovalCommentLine.SETRANGE("Document No.","Document No.");
    IF ApprovalCommentLine.FIND('-') THEN
    REPEAT
    PostedApprovalCommentLine.INIT;
    PostedApprovalCommentLine.TRANSFERFIELDS(ApprovalCommentLine);
    PostedApprovalCommentLine."Entry No." := 0;
    PostedApprovalCommentLine."Table ID" := ToTableId;
    PostedApprovalCommentLine."Document No." := ToNo;
    PostedApprovalCommentLine.INSERT(TRUE);
    UNTIL ApprovalCommentLine.NEXT = 0;

    Regards,

    Aron

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans