Create Event Handler with below code
[PostHandlerFor(formStr(DirPartyCheckDuplicate), formMethodStr(DirPartyCheckDuplicate, enableSearch))]
public static void DirPartyCheckDuplicate_Post_enableSearch(XppPrePostArgs args)
{
FormRun formRun = args.getThis() as FormRun;
FormCheckBoxControl TaxId = formRun.design(0).controlName("TaxId") as FormCheckBoxControl;
FormStringControl PartyNumber = formRun.design(0).controlName("DirPartyTable_PartyNumber") as FormStringControl;
FormComboBoxControl TaxIdType = formRun.design(0).controlName("TaxIdType") as FormComboBoxControl;
FormControl searchBtn = formRun.design(0).controlName("searchBtn");
if(TaxId.value() ||
PartyNumber.valueStr() ||
TaxIdType.valueStr())
{
searchBtn.enabled(true);
}
else
{
searchBtn.enabled(false);
}
}
Just like enabling controls through event handlers streamlines workflows in AX 7/D365 F&O, the path of building community thrives by sharing efficient build strategies. Both highlight the power of collaboration and smart customization.
ReplyDelete