How to know whether this is an invoice or packing slip from d365fo x++

 How to know whether this is an invoice or packing slip from  d365fo x++

Code:

void  init()
    {
        next init();

        boolean documentStatus      = this.documentStatus == DocumentStatus::Invoice;
        boolean EnableCustomization = DSProposedCustomizations::isValid(DSProposedCustomization::AQMAccountStatementReportsDescription);

        SalesParmTable_DS.object(fieldNum(SalesParmTable, ALF_InvoiceDescriptionInEnglish)).mandatory(documentStatus && EnableCustomization);
        SalesParmTable_DS.object(fieldNum(SalesParmTable, ALF_InvoiceDescriptionInArabic)).mandatory(documentStatus && EnableCustomization);

    }

Comments

Popular posts from this blog

D365FO – AX – X++ –Refresh, Reread, Research, and ExecuteQuery

Create Inventory Journal through Code in D365FO X++

SalesLine Reservation in D365fo x++