PeopleCode Tip: Identify Current Record

If you want to use a button on more than one scroll on the same page, you may need to be able to identify the scroll area where the button was clicked.

Reusing a button on different pages can be resolved with:

If %Page = Page.xxx
PeopleCode

But for a button in different scroll areas on the same page, we may need to resolve the primary scroll area record name:

Local Row &SelectedRow;

Local Rowset &rs;

Local Record &rec;

Local String &recname, &recstring;

&SelectedRow = GetRow();

&rs = &SelectedRow.ParentRowset;

&recname = &rs.DBRecordName;

&recstring = "Record." | &recname;

&rec = GetRecord(@&recstring);
PeopleCode

Was this article helpful?

Related Articles

Leave a Reply