Hi joshbarnettlloyd,
At least, looking into the code, this should have worked. We call the GetSalesTransactionCustomReceiptFieldServiceRequest for every fields that fall under the default (custom). We would also suggest implementing IRequestHandlerAsync and follow the sample extensions that we ship to make sure it’s working.
Sample overview:
The sample shows how to implement custom receipt fields and custom receipt types.
Setup steps:
Custom Receipt Fields
1. Create labels.
- In AX search for "Language text".
- Go to that page and create three labels: "TipAmount", "ItemNumber" and "TenderId".
- Specify a different Text ID to each of them and set Language ID as "en-us".
2. Create custom receipt fields.
- In AX search for "Custom fields".
- Go to that page and create three custom fields: "TipAmount", "ItemNumber" and "TenderId".
- Set the Type as Receipt.
- Assign corresponding Caption text ID you created in previous step to them.
3. Modify the receipt format.
- In AX search for "receipt format".
- Open the designer for receipt type "Receipt".
- Now you should be able to see those three new fields you created in previous steps.
- Drag and drop them to the canvas and save the receipt format.
- Put the TipAmount in the header or footer section.
- Put the ItemNumber in the body section.
- Put the TenderId on the same line of TenderName or TenderAmount.
4. Run download job 1090 (Registers).
5. Open project at RetailSDK\SampleExtensions\CommerceRuntime\Extensions.ReceiptsSample\CommerceRuntime.Extensions.ReceiptsSample.csproj and compile it.
6. Use inetmgr to find the location of the local Retail Server
7. Copy the Contoso.Commerce.Runtime.ReceiptsSample.dll to the bin folder of RetailServer. This will only work on this development machine. For a real customization dll needs to be added to the deployment package, "register" it in Customizations.settings file (see the Retail Sdk Handbook.pdf for details)
8. Register the CRT change in commerceruntime.ext.config (Note: Please DO NOT edit commerceruntime.config file. This file is not meant for any customizations.):
<add source="type" value="Contoso.Commerce.Runtime.ReceiptsSample.GetCustomReceiptFieldsService, Contoso.Commerce.Runtime.ReceiptsSample" />
9. Now make a normal transaction in POS and check out the transaction. Now you should be able to see those values printed on the receipt.
Hope it helps.
Thank you for using Microsoft Dynamics Communities,
Juliet Zhu
SR SUPPORT ENG
Microsoft Dynamics AX / Dynamics 365 Commerce
If my information answers your question please click 'Yes' against "Did this answer your question?" to help other community members.