The Screen Active Record ID is used by Method to keep track of which record is currently being viewed or modified.
For example, a Method user selects a contact from the contacts grid and is taken to the View Contact screen, showing the contact they selected. Behind the scenes, when the user selects the contact, the Record ID of that contact is stored in the Screen Active Record ID. When the View Contact screen comes up, it will use the Screen Active Record ID to find the contact in the Contacts table and load that record onto the screen.
The Set Active Record ID for Screen action will set the value for the Screen Active Record ID.
Using Set Active Record ID for Screen Action
This action is easy enough to configure, you give it the numerical value you wish to set.
Normally, this value is not entered in manually, considering we do not memorize the Record ID's of different records. Rather, a Record ID is retrieved and stored in an action result, and then we use the action result when setting the Screen Active Record ID.
Once the Screen Active Record ID is set, fields on the screen will be populated with values from the record who's record ID is stored in the Screen Active Record ID.
If you wish to clear the value in the Screen Active Record ID, you can use the action Clear Screen for New Entry.
In this scenario, one screen has been created to view and edit the Lead Source. By selecting a lead source in the grid, the fields on the screen will be updated (in this case, there is only one field, the Lead Source field).
In the above image, the "Employee Referral" record has been selected and the Lead Source field on the screen has been updated to reflect that. Any text edits done to this will be saved when the user hits the save button.
The Set Active Record ID for Screen action is placed in the grid's Row Click Event.
Why the Row Click event? We want to set the Screen Active Record ID using the Record ID of the row the user clicked.
There is only action in the row click event, our Set Active Record ID for Screen action:
The image above exemplifies how the Screen Active Record ID is set from a clicked row.
Once the row is clicked and the Active Record ID set, then all the fields on the screen will automatically load with the data from the record.