Hello Experts,
For un editable "Add line" button in SalesLine we use --> SalesLine.allowCreate(false) .What we use for making un editable "Add lines" button .
Hi Mohit,
Yes this worked for me.
Thanks Mohit & Girish
Try creating extension class for SalesTableInteraction class, create CoC on enableLineRetailActions method and write below code.
protected void enableLineRetailActions() { next enableLineRetailActions(); if (salesLine.PickingInProgress_CAP == NoYes::Yes) { #SetEnabled(formcontrolstr(SalesTable, retailAddItemMenuItem), False) } }
Right click that method and do find reference and see where it is used, especially in SalesTable form.
Also try adding the logic on onActivated event handler and check.
Thanks,
Girish S.
Hi ,
I think here it is enabling.
Add breakpoint on editSales method in SalesTable form and check if its called after active method. Also, find 'RetailAddItemMenuItem' in SalesTable form and add breakpoints to debug. Standard code will definitely be setting value to True after activated method sets it to False.
Also add breakpoint on enableLineRetailActions method in SalesTableInteraction class.
It seems that somewhere the button is enabled again in the standard code.
See whether there is any standard code available for enabling disabling of the button.
Yes,
I debugged the code it is showing enable false for both buttons.
Have you debugged the code.?
See what is the value of salesLine buffer/
Have you debugged the code? Check if RetailAddItemMenuItem is initialized correctly.
Also If you want to enable/disable buttons based on data in SalesLine then Active method is correct.
Written the code provided but same result.
Add product is editable.
NOTE- Also written the code on SalesLine form Datasource OnInitialized
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 1,132
André Arnaud de Cal... 778 Super User 2025 Season 2
Sohaib Cheema 739 User Group Leader