I have added a new menubutton on Sales Order form/page and it has 'Edit' as one of the menu option. I have written following code in the OnPush() / OnAction() tirgger of 'Edit' menu option:
Edit - OnAction()
//Obtain the currently selected Salesline record from the Sales Line subform
CurrPage.SalesLines.FORM.GETRECORD(CurrSalesLine); //CurrSalesLine-> SalesLine record var.
The purpose of this code is to fetch the currently selected SalesLine record when a user selects a salesline from the Sales Order subform of Sales Order Card/Page and do some processing based on the values it possesses.
In Classic Client, the above code execution sets CurrSalesLine var. properly to refer to the currently selected salesline on the Sales Order Card.
However in Role Tailored Client, the CurrSalesLine var. does not change according to the selection made on the Sales Order page. It always refers to the first salesline record present on the Sales Order page.
I am not sure why is the CurrSalesLine var. not set properly in RTC?
Is the GETRECORD() function not working for Page object.?