Posted on 24/08/2021 15:12:14
Hi Nicolai,
It's the Sales Rep scenario. To be clear, let's assume:
- You are the Sales Rep
- There are 2 Customers you can impersonate
- DW (customer number = 123)
- DWNA (customer number = 789)
- I can only impersonte DWNA (customer number = 789)
Considering that order drafts were all integrated/imported, there is no AccessUserId, so:
- The first bullet does not work
- because it's the user id that does not exist
- because the order drafts are not associated with "You" but with the accounts you can impersonate
- The second bullet does not work
- because you'd have to be impersonating 1 account at a time to see the order drafts
- because the order drafts are not associated with "You" but with the accounts you can impersonate
- The third bullet does not work
- because the code is getting the order drafts from the accounts you can impersonate based on userid, not customer number
So the Sales Rep really has to impersonate 1 customer at a time to do this. I understand this is the most reasonable setup, but our scenario is for Sales Reps that manage order drafts for all of their customers at a time.
(I realize there's an adjacent issue, which is creating an order draft from the UI and assiging it to a Customer. We'd have to update the templates or some notification to populate the customer number as well, otherwise we'll have an inssue between order drafts created on the web vs integrated)
Does that explain the issue better?
Nuno