Announcements
Hii,
On SalesTableListPage and SalesTable DetailsPage we need to disable Edit Button if Customer belongs to Cash Customer Group (Customer Group name is Cash).
For all other Customers Groups Edit button should work as normal.
How I can achieve it and code examples?
Thanks,
Hi Rana Anees,
For SalesTableListPage, you can modify setButtonSell method in SalesTableListPageInteraction class. You can set the variable "allowUpdate" in this method to false if the customer group name is "Cash".
private void setButtonSell() { SalesTableType salesTableType = this.currentSalesTable().type(); boolean allowDelete = salesTableType.checkDelete(true, true);//We cannot show any dialogs from the list page as is also renders on EP. boolean allowUpdate = salesTableType.checkUpdate(false, false); FormDataSource salesTable_ds; // Changes for disabling edit for sales orders if (CustGroup::find(this.currentSalesTable().CustGroup).Name == "Cash") { allowUpdate = false; } // Rest of the code }
For SalesTable form, you can put this logic in the SalesTable dataource active method. you can set the datasource allowEdit to false.
if (CustGroup::find(salesTable.CustGroup).Name == "Cash") { salesTable_ds.allowEditfalse; }
André Arnaud de Cal...
293,309
Super User 2025 Season 1
Martin Dráb
232,160
Most Valuable Professional
nmaenpaa
101,156
Moderator