Hello All,
I need help here.
Warehouse management > Common > Load planning workbench
If the Load Status is "Open", then the Release Button must be Enabled (Default).
If the Load Status is Not "Open", then the Release Button must be Disabled.
must be triggered upon clicking a data.
is this possible?
Please help, thanks.
*This post is locked for comments
yes thanks for the answers, i'll try to put it in every Datasource to try it. Thanks!
we are not sure about status field which is appearing in upper part, as system is in your hand; whether that belongs to WHSLoadTable or some other Datasource
Or may be it is because of upper gird is bound to another dataSource.
from your above screenshot(1st one) it seems that it may be part of SalesLine
Thanks Sohaib Cheema, Bhaskar Roy!
the code works,
but there's one more flaw here.
the WHSLoadTable is linked in the bottom part of the Form (Loads).
the Load status in the upper part is also part of WHSLoadTable, but the active method only works in the bottom part of Form.
i need it to work in the upper Load status, not the bottom one.
*im trying the code :
ReleaseMenuButton.enabled(WHSLoadTable.LoadStatus == WHSLoadStatus::Open ? true : false);
in other DataSource to see if it might work, but might as well ask if you know where to put it.
Please go to
\Forms\WHSLoadPlanningWorkbench\Designs\Design\[Tab:DemandLoadsTab]\[TabPage:TabLoad]\[ActionPane:ActionPaneLoad]\[ActionPaneTab:ActionPaneTabLoad]\[ButtonGroup:Info]\[MenuButton:ReleaseMenuButton] -
ReleaseMenuButton - do autodeclartion yes.
\Forms\WHSLoadPlanningWorkbench\Data Sources\WHSLoadTable\Methods\active-- before return write below code
ReleaseMenuButton.enabled(WHSLoadTable.LoadStatus == WHSLoadStatus::Open ? true : false);
check if there is existing active method on datasource; if not do override it by right clicking methods node of datasource, and then write code after super() as under
if(condition)
{
ButtonName.enabled(true);
}
else
{
ButtonName.enabled(false);
}
the Release button is always Enabled, I just want to add the Disable function.
can you help me with the code? thanks.
of course, on any form buttons can be enabled/disabled by writing code at active() method.
But, very important thing is to know/read existing logic. how your code will behave in combination with existing business process? are those buttons already being enabled/disabled by any business process? these questions must be answered before you start writing code at active() method.
sometimes form(s) do have a interaction class, where the buttons enable/disable is being handled based on many aspects, those need review.
it is not about possible/impossible. its about reading your customization in combination with existing business process.
Yes,It is possible. you can achiev through active method which will be good pratice this type scenarion. But if you want through button click also possible.
Make release button - as autodiclartion yes
and put the logic.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156