Hi,
I would like to disable a button on salesQuotationtable under some conditions.
but I have problem to find where to put my code
button.enable(false);
I try to put it in active method of datasource.
I debug and make sure it did run the code. however maybe it changed status after I setup.
I open the form the button is still enabled.
so I would like to know is there a place to put the code under this scenario?
P.S : I read this article : event method sequence when a form is open
(https://msdn.microsoft.com/en-us/library/aa608211.aspx)
it does even include active() method , why?
Thanks for all the answer
Quatrani
*This post is locked for comments
Hello,
Confirm button is enabled/disabled based on the value of method “mayConfirmationBeUpdated” in class “SalesQuotationTableType” so you better add your logic to “SalesQuotationTableType” method to enable/disable the button. This way you don’t need separate code for Quotation form and list page.
Best,
Srini
Hi,
Confirm button on form SalesQuotationTable is driven(enabled/disabled) in the method enableHeaderUpdateActions. Place a breakpoint in this method and check which condition is enabling the button.
This method is called in the following methods on form:
\Forms\SalesQuotationTable\Data Sources\SalesQuotationTable\Methods\active
\Forms\SalesQuotationTable\Data Sources\SalesQuotationTable\Methods\
selectionChanged
\Forms\SalesQuotationLine\Data Sources\SalesQuotationLine\Methods\active
\Forms\SalesQuotationLine\Data Sources\SalesQuotationLine\Methods\
selectionChanged
Hi, Crispin:
Thanks.
The condition is:
When the sales Quotation is generated, we write the quotation data to another system. then we have to prevent user to modify the quotation until feedback from another system.
So what I actual want to do is prevent user to modify sales quotation
I add code
salesQuotationTable_DS.allowEdit(false),
salesQuotationTable_DS.allowDelete(false)
salesQuotationLine_DS.allowEdit(false),
salesQuotationLine_DS.allowDelete(false)
in active() of form datasource. which is fine.
However I find confirm button in follow up tab of SalesQuotationTable(detailPage) is still enabled.
So I want to disable it. when another system status of this quotation is send
Do you have any suggestion? thanks
you can put your code in init() method for your form
Hi,
Could you provide some more information about your conditions/requirements, such that we can help you better.
André Arnaud de Cal...
291,979
Super User 2025 Season 1
Martin Dráb
230,848
Most Valuable Professional
nmaenpaa
101,156