Exporting Sales Quotes from Dynamics 365 Business Central
This task will export sales quotes from Dynamics 365 Business Central to Dynamics 365 Business Central Sales Quote XML format.
Settings
Dynamics 365 Business Central Connection
Required
The connection to Dynamics 365 Business Central to use. See the Connecting to Dynamics 365 Business Central article if you require more information on how to create/manage connections.
Export Attachments
Required
Set to true to include detailed attachment information in the output from the task, including a base-64 encoded copy of the attached file.
Export Country/Regions
Required
Set to true to include detailed country/regions information in the output from the task.
Export Currencies
Required
Set to true to include detailed currency information in the output from the task.
Export Customers
Required
Set to true to include detailed customer information in the output from the task.
Export Dimension Set Lines
Required
Set to true to include detailed dimension set line information in the output from the task.
Export Payment Terms
Required
Set to true to include detailed payment term information in the output from the task.
Export PDF Documents
Required
Set to true to include detailed PDF document information in the output from the task, including a base-64 encoded copy of the PDF file.
Caution
The task will fail if this setting is true, and any of the records to be exported are not at a status that would allow a PDF to be generated. We recommend applying a filter to ensure the task only exports records at the correct status.
Export Settings
Required
- Date Modified - Only records modified after this date will be exported. The date will update automatically each time the task runs.
- Export Modified or All Records - Used to choose which records should be included in the export. Note that the 'Modified' setting will also export any new records.
Export Shipment Methods
Required
Set to true to include detailed shipment method information in the output from the task.
Filter
Optional
Specify criteria to use to filter the records output by the task. The filter is specified using the OData format, e.g. id eq c998d7da-549e-ed11-988a-000d3a3885d3
. See Filtering for more information.
Output File
Required
The name of the file to write the exported records to. The data will be exported in XML format, a sample is provided below.
Page Size
Required
The maximum number of records to requested at a time. Increasing this will speed up the export but will use more memory and may result in timeout errors. The maximum is 20000.
Zynk Settings
Examples
Sample output file:
<?xml version="1.0" encoding="utf-8"?>
<SalesQuotes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SalesQuote>
<Id>8bf4e1bb-dabc-ed11-9a88-6045bd0cf992</Id>
<ExternalId>740fcf</ExternalId>
<ODataETag>W/"JzIwOzE0Njg1ODAyODI5MzU4MTU0MzkyMTswMDsn"</ODataETag>
<Number>1003</Number>
<ExternalDocumentNumber>TEST-0001</ExternalDocumentNumber>
<PostingDate>2023-03-07T00:00:00</PostingDate>
<CustomerId>d4f4fd40-34bc-ed11-9a88-6045bd0cf992</CustomerId>
<CustomerNumber>C00020</CustomerNumber>
<CustomerName>Zynk Software</CustomerName>
<BillToName>Zynk Software</BillToName>
<BillToCustomerId>d4f4fd40-34bc-ed11-9a88-6045bd0cf992</BillToCustomerId>
<BillToCustomerNumber>C00020</BillToCustomerNumber>
<BillToAddressLine1>6 Charlotte Square</BillToAddressLine1>
<BillToAddressLine2>6 Charlotte Square</BillToAddressLine2>
<BillToCity>Newcastle Upon Tyne</BillToCity>
<BillToCountry>GB</BillToCountry>
<BillToState>Tyne & Wear</BillToState>
<BillToPostCode>NE1 4XF</BillToPostCode>
<SellToAddressLine1>6 Charlotte Square</SellToAddressLine1>
<SellToAddressLine2>6 Charlotte Square</SellToAddressLine2>
<SellToCity>Newcastle Upon Tyne</SellToCity>
<SellToCountry>GB</SellToCountry>
<SellToState>Tyne & Wear</SellToState>
<SellToPostCode>NE1 4XF</SellToPostCode>
<CurrencyId>00000000-0000-0000-0000-000000000000</CurrencyId>
<CurrencyCode>GBP</CurrencyCode>
<PaymentTermsId>0398d7da-549e-ed11-988a-000d3a3885d3</PaymentTermsId>
<ShipmentMethodId>b598d7da-549e-ed11-988a-000d3a3885d3</ShipmentMethodId>
<Salesperson>JO</Salesperson>
<DiscountAmount>0</DiscountAmount>
<TotalAmountExcludingTax>104.25</TotalAmountExcludingTax>
<TotalTaxAmount>20.85</TotalTaxAmount>
<TotalAmountIncludingTax>125.1</TotalAmountIncludingTax>
<Status>Draft</Status>
<LastModifiedDateTime>2023-03-07T11:25:28.44Z</LastModifiedDateTime>
<PhoneNumber>0191 820 1484</PhoneNumber>
<Email>[email protected]</Email>
<Customer>
<Id>d4f4fd40-34bc-ed11-9a88-6045bd0cf992</Id>
<ODataETag>W/"JzIwOzEzMzE2NzA3MzUyOTk2NjU1NzExMTswMDsn"</ODataETag>
<Number>C00020</Number>
<DisplayName>Zynk Software</DisplayName>
<Type>Company</Type>
<AddressLine1>Office 16</AddressLine1>
<AddressLine2>6 Charlotte Square</AddressLine2>
<City>Newcastle</City>
<State>Tyne & Wear</State>
<Country>GB</Country>
<PostalCode>NE1 4XF</PostalCode>
<PhoneNumber />
<Email>[email protected]</Email>
<Website>www.zynk.com</Website>
<TaxLiable>false</TaxLiable>
<TaxAreaId>248e3bdf-549e-ed11-988a-000d3a3885d3</TaxAreaId>
<TaxAreaDisplayName>Domestic customers and vendors</TaxAreaDisplayName>
<TaxRegistrationNumber />
<CurrencyId>00000000-0000-0000-0000-000000000000</CurrencyId>
<CurrencyCode>GBP</CurrencyCode>
<PaymentTermsId>fa97d7da-549e-ed11-988a-000d3a3885d3</PaymentTermsId>
<ShipmentMethodId>ae98d7da-549e-ed11-988a-000d3a3885d3</ShipmentMethodId>
<PaymentMethodId>c58d3bdf-549e-ed11-988a-000d3a3885d3</PaymentMethodId>
<Blocked>_x0020_</Blocked>
<LastModifiedDateTime>2023-03-06T15:33:37.68Z</LastModifiedDateTime>
</Customer>
<PaymentTerm>
<Id>0398d7da-549e-ed11-988a-000d3a3885d3</Id>
<ODataETag>W/"JzE5OzY5NjU2MjU2MjE2OTIwNDAxOTIxOzAwOyc="</ODataETag>
<Code>COD</Code>
<DisplayName>Cash on delivery</DisplayName>
<DueDateCalculation>0D</DueDateCalculation>
<DiscountDateCalculation />
<DiscountPercent>0</DiscountPercent>
<CalculateDiscountOnCreditMemos>false</CalculateDiscountOnCreditMemos>
<LastModifiedDateTime>2023-01-27T15:11:51.347Z</LastModifiedDateTime>
</PaymentTerm>
<ShipmentMethod>
<Id>b598d7da-549e-ed11-988a-000d3a3885d3</Id>
<ODataETag>W/"JzIwOzE0NTM3Mjk0ODM0Nzg1MTQ1NDMxMTswMDsn"</ODataETag>
<Code>DELIVERY</Code>
<DisplayName>DELIVERY</DisplayName>
<LastModifiedDateTime>2023-01-27T15:11:52.847Z</LastModifiedDateTime>
</ShipmentMethod>
<Attachments />
<DimensionSetLines>
<DimensionSetLine>
<Id>418e3bdf-549e-ed11-988a-000d3a3885d3</Id>
<ODataETag>W/"JzE5Ozk5MTg4NjI5NDM1NjkxOTY0NDMxOzAwOyc="</ODataETag>
<Code>SALESPERSON</Code>
<ParentId>8bf4e1bb-dabc-ed11-9a88-6045bd0cf992</ParentId>
<ParentType>Sales_x0020_Quote</ParentType>
<DisplayName>Salesperson</DisplayName>
<ValueId>b8913bdf-549e-ed11-988a-000d3a3885d3</ValueId>
<ValueCode>JO</ValueCode>
<ValueDisplayName>Jim Olive</ValueDisplayName>
</DimensionSetLine>
</DimensionSetLines>
<DocumentDate>2023-03-07T00:00:00</DocumentDate>
<DueDate>2023-04-01T00:00:00</DueDate>
<ShipToName>John Smith</ShipToName>
<ShipToContact>John Smith</ShipToContact>
<ShipToAddressLine1>6 Charlotte Square</ShipToAddressLine1>
<ShipToAddressLine2>6 Charlotte Square</ShipToAddressLine2>
<ShipToCity>Newcastle Upon Tyne</ShipToCity>
<ShipToCountry>GB</ShipToCountry>
<ShipToState>Tyne & Wear</ShipToState>
<ShipToPostCode>NE1 4XF</ShipToPostCode>
<SentDate>0001-01-01T00:00:00Z</SentDate>
<ValidUntilDate>2023-04-01T00:00:00</ValidUntilDate>
<AcceptedDate>0001-01-01T00:00:00</AcceptedDate>
<SalesQuoteLines>
<SalesQuoteLine>
<Id>2e7cbac2-dabc-ed11-9a88-6045bd0cf992</Id>
<ODataETag>W/"JzIwOzE3MDMwMzA4MDk0MTk0MjU1MjA0MTswMDsn"</ODataETag>
<DocumentId>8bf4e1bb-dabc-ed11-9a88-6045bd0cf992</DocumentId>
<Sequence>10000</Sequence>
<ItemId>2c99d7da-549e-ed11-988a-000d3a3885d3</ItemId>
<AccountId>00000000-0000-0000-0000-000000000000</AccountId>
<LineType>Item</LineType>
<LineObjectNumber>1936-S</LineObjectNumber>
<Description>BERLIN Guest Chair, yellow</Description>
<UnitOfMeasureId>2d8c3bdf-549e-ed11-988a-000d3a3885d3</UnitOfMeasureId>
<UnitOfMeasureCode>PCS</UnitOfMeasureCode>
<Quantity>1</Quantity>
<DiscountAmount>0</DiscountAmount>
<DiscountPercent>0</DiscountPercent>
<DiscountAppliedBeforeTax>false</DiscountAppliedBeforeTax>
<AmountExcludingTax>104.25</AmountExcludingTax>
<TaxCode>STANDARD</TaxCode>
<TaxPercent>20</TaxPercent>
<TotalTaxAmount>20.85</TotalTaxAmount>
<AmountIncludingTax>125.1</AmountIncludingTax>
<NetAmount>104.25</NetAmount>
<NetTaxAmount>20.85</NetTaxAmount>
<NetAmountIncludingTax>125.1</NetAmountIncludingTax>
<ItemVariantId>00000000-0000-0000-0000-000000000000</ItemVariantId>
<UnitPrice>125.1</UnitPrice>
</SalesQuoteLine>
</SalesQuoteLines>
<PdfDocument>
<Id>8bf4e1bb-dabc-ed11-9a88-6045bd0cf992</Id>
<ODataETag>W/"JzIwOzEyNzQ1MDg0NDM3OTMwNDc5NjMzMTswMDsn"</ODataETag>
<ParentId>8bf4e1bb-dabc-ed11-9a88-6045bd0cf992</ParentId>
<ParentType>Sales_x0020_Quote</ParentType>
<PdfDocumentContentReadLink>https://api.businesscentral.dynamics.com/v2.0/PRODUCTION/api/v2.0/companies(bba482b8-549e-ed11-988a-000d3a3885d3)/salesQuotes(8bf4e1bb-dabc-ed11-9a88-6045bd0cf992)/pdfDocument/pdfDocumentContent</PdfDocumentContentReadLink>
<PdfDocumentContent><!-- base 64 encoded content here --></PdfDocumentContent>
</PdfDocument>
</SalesQuote>
</SalesQuotes>