Get Sales Quotation by Customer ID in X++ | Dynamics 365 FO Development

Creating a Sales Quotation using X++ code in Dynamics 365 Finance and Operations involves several steps. Below is an example of how you might achieve this. Please note that you may need to adapt the code to fit your specific requirements and the structure of your solution.
 
Please replace _custAccountId, _currencyCode, _itemId, and _qty with your actual values.
 
AxSalesQuotationTable    AxSalesQttable;
AxSalesQuotationLine     AxSalesQtline;
AxSalesQttable =  new AxSalesQuotationTable();
AxSalesQttable.parmCustAccount(_custAccountId);
AxSalesQttable.parmCurrencyCode(_currencyCode);
AxSalesQttable.save();
 
AxSalesQtline =  new AxSalesQuotationLine();
AxSalesQtline.axSalesQuotationTable(AxSalesQttable);
AxSalesQtline.parmQuotationId(AxSalesQttable.parmQuotationId());
AxSalesQtline.parmItemId(_itemId);
AxSalesQtline.parmSalesQty(_qty);
AxSalesQtline.parmcurrencyCode(_currencyCode);
AxSalesQtline.save();
 

This is a basic example, and you may need to customize it based on your specific requirements. Make sure to replace placeholder values, such as customer account numbers, item numbers, and location IDs, with the appropriate values for your environment. 

Comments

Popular posts from this blog

Create custom workflow in D365 X++

Convert amount from one currency to another currency using X++

How to Create Extended Data Types (EDTs) in Finance and Operations of Dynamics 365 -- F&O Customization Part 2