Friday, January 24, 2014

Creation of dialog and dialog field Example

//Creation of dialog and dialog field Example

void method name()
{
            Dialog dialog;
            DialogGroup dialogGroup;
            DialogField dialogFieldCustAccount;
            DialogField dialogFieldCurrency;
            DialogField dialogFieldVendAccount;
            DialogField dialogFieldCustomerGroup;
            DialogField dialogFieldInclTax;
            dialog = new Dialog("Simple Dialog");
            dialogGroup = dialog.addGroup("Customer");
            dialogFieldCustAccount = dialog.addField(extendedTypeStr(CustAccount));
            dialogFieldCustomerGroup = dialog.addField(extendedTypeStr(CustGroupId));
            dialogGroup = dialog.addGroup("Currency");
            dialogFieldCurrency = dialog.addField(extendedTypeStr(CurrencyCode));
            dialogGroup = dialog.addGroup("Vendor Details");
            dialogFieldVendAccount = dialog.addField(extendedTypeStr(VendAccount));
            dialogGroup = dialog.addGroup("Tax Group");
            dialogFieldInclTax = dialog.addField(extendedTypeStr(InclTax));
            if(dialog.run())
            {
                info(dialogFieldCustAccount.value());
                info(dialogFieldCurrency.value());
                info(dialogFieldCustomerGroup.value());
                info(dialogFieldVendAccount.value());
                info(dialogFieldIncltax.value());
            }

}

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...