Difference Between OnAfterGetRecord & OnAfterGetCurrRecord

toootooo Member Posts: 138
Can anyone tell me the difference between these two triggers on a form, i'm getting confused:
OnAfterGetRecord
OnAfterGetCurrRecord

I have the same code in both triggers but have a feeling i don't need too.

Thanks in advance.

Answers

  • kapamaroukapamarou Member Posts: 1,152
    OnAfterGetCurrRecord
    The C/AL code in this trigger is executed after the current record is retrieved from the table.

    Applies to
    Forms

    Comments
    In a form with a table box, the system only calls this trigger when it updates the current record in the table box.

    If there is an error in the code in this trigger, the system closes the form.


    OnAfterGetRecord (Forms)
    The C/AL code in this trigger is executed after a record is retrieved from a table but before it is displayed to the user. Typically, you will use this trigger to calculate variables that depend on the current record.

    Applies to
    Forms

    Comments
    In a form with a table box, the system calls this trigger for each record in the table box, as the records are updated.

    If there is an error in the code in this trigger, the system closes the form.

    Taken from the C/SIDE Reference Under help.
    The development manuals have more info.



    I suggest the following.
    Go to a form and add 2 messages: InAfterGer and InAfterGetCurrent. Then run the form to see the results and get the handle of it. I suggest doing this in a List form...
  • toootooo Member Posts: 138
    Nice one, thanks for your help.
Sign In or Register to comment.