EventSubscriber - Get Calling Record

headley27headley27 Member Posts: 235

I am looking at using this EventSubscriber to change the IsHandled value based on a condition.

[EventSubscriber(ObjectType::Table, database::"Sales Line", 'OnBeforeValidateBlanketOrderLineNo', '', true, true)]

local procedure OnBeforeValidateBlanketOrderLineNo(var IsHandled: Boolean)

As there is no reference to the Sales Line in the OnBeforeValidateBlanketOrderLineNo Local Procedure itself, is there any way that I can get access to which Record (Sales Line) is calling the EventSubscriber/Local Procedure?

Thank you,


  • DenSterDenSter Member Posts: 8,304
    Looks like Rec is part of the signature of the eventpublisher in the Sales Line table
    The parameter name is SalesLine and you should be able to add that to your function
    Put your cursor in the parameter section and hit intellisense. You should be able to add 'SalesLine'. It's by reference so you can change any field value
Sign In or Register to comment.