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

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...