Hello community,
I'm trying to implement a customization on D365 Commerce in order to integrate carts with a 3-rd party provider.
At the moment I managed to create a POS operation to deal with the whole flow that performs following steps:
1. Perform some checks (e.g. empty cart)
2. Ask user for order identifier (with a templated dialog)
3. Retrieve order information from 3rd party provider (through CRT)
4. Load products into cart
5. Move to cart view
And everything is currently working quite good.
My concern now is user interaction: while performing step 1 checks, the POS layout is displaying an "Operation in progress" screen, blocking further user interaction (great!). But during step 3 and 4 (which are actually longer than step 1) the POS layout is "free" and user could accidentally perform other operations.
Is there a way to block the POS layout and show the same "operation in progress" screen by code (something like "show waiting screen before step 3" and "hide waiting screen after step 4")? I've been looking into standard code in PosCore/PosFramework js files, but I'm not able to use them from my ts implementation.
Should I refactor the operation flow, maybe rearranging code in different places? Any suggestion?