web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Get the selected sales transaction from the GetReceiptEmailAddressClientRequestHandler from Show Journal

(0) ShareShare
ReportReport
Posted on by 635

Is there a way to get the selected sales transaction from the GetReceiptEmailAddressClientRequestHandler. I have a requirement to save a property on the salestransaction.

Requirement: When in cart once the user a enters the email. Display a custom dialog for input. Save it on the sales transaction. This should also work from show journal > show receipt > send receipt - user enters email address, a custom dialog is displayed

 

If I go from the cart, I have access to the cart and I can add my commerce property on the cart entity and retrieve it in crt and save it on sales transaction.

But If I go from show journal I have no reference to the selected transaction. Any ideas around this. I have attached the code for going through the cart... how to achieve this from the show journal > show receipt > send receipt

2021_2D00_01_2D00_06_5F00_13_2D00_05_2D00_39.png

I have the same question (0)
  • ToddB Profile Picture
    on at

    Hi Shahil,

    I am checking to see what I can find in regard to this.

  • Shane C Erstad Profile Picture
    on at

    Hi Shahil,

    Based on your code and your notes, I believe what you're trying to do is this:

    - Allow the POS to prompt for the email address

    - After user completes that prompt, open a new prompt to ask for another value

    - Store that value to an Extension Property

    - Have that value saved in the sales transaction

    The problem when going through this process through Show Journal, there isn't a current Cart/Transaction in MPOS.  In fact, if you have a current cart open in MPOS you can't even get to the screen to print or email a reprinted receipt.

    Taking a look at the _sendReceiptEmailAsync in the POS code, the client queues up these requests:

    - GetCustomerReceiptEmailAddressClientRequest

    - SendReceiptServiceRequest

    The second one is the actual call to the CRT.  That code doesn't rely on a current Cart in the POS - all that gets sent to the Retail Server is a) an email address and b) a search criteria (basically the string of the requested Transaction ID).

    Once Retail Server gets ahold of that request (/SalesOrders/SendReceipt) all it does is run through the receipt printing code to generate and send the email.  Again, since there is no Cart / Transaction at this point, there is nothing that the Extension Property can tag along with to get to the CRT to do anything with.  Even if there were, you wouldn't be able to save it to that Transaction ID because you can never go back and add information to existing transactions.

    So I don't really see a way to do what you want from the Show Journal receipt emailer.

    Let me know if I don't quite understand the process you're looking to accomplish.

    Thanks,
    Shane

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 221 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 151 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 46

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans