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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

how to Get stranded Runtime Global record variable data in Event subscriber using AL [BC 16.3 Wave 1]

(0) ShareShare
ReportReport
Posted on by 256

Hi All,

I am subscribing event in "Purch.-Post" [90 codeunit  ie. "OnBeforePostVendorEntry".  see the below code

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnBeforePostVendorEntry', '', true, true)]
            local procedure PostWHTCal(var GenJnlLine: Record "Gen. Journal Line"; var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")
            begin
                
            end;

The issue is that I want to access some standard "Purch.-Post" [90  codeunit global record variables like  "TempPurchLineGlobal" and "PurchInvHeader" but an "OnBeforePostVendorEntry" event subscriber having only below Parameter

[Var GenJnlLine: Record "Gen. Journal Line"; var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"

so how can access the standard global record variable while the Subscribing event?

Please help me with that issue.

Thanks in Advance

  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,306 Super User 2026 Season 1 on at

    If it's not exposed on the event, there is no way for you to get the global variable.

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 545 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 354 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 228 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans