Options

CurrFieldNo (in Event) OnAfter Validate FIELD

SteveSteve Member Posts: 81
Looking for best practice on this and clarification.

I'm using events to do a majority of my changes to base tables and utilized this event several times. The only time the event is triggered is when the field you set in the property is validated, but the local function sends the CurrFieldNo. Is it best practice to test for the CurrField No being the same as you specific in the function property? or not?

Using code such as:

LOCAL [EventSubscriber] OnAfterValidateAccountNo(VAR Rec : Record "Gen. Journal Line";VAR xRec : Record "Gen. Journal Line";CurrFieldNo : Integer)

IF CurrFieldNo <> 4 THEN
EXIT;

Or

IF CurrFieldNo <> FIELDN0("Account No.") THEN
EXIT;


Then do my coding....



***Basically do you need to add the code in BOLD? or skip it?




Thanks
Steve

Best Answers

Answers

Sign In or Register to comment.