AddToCart change default login user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 01:36 AM
I use Cart for Draft use, I need to generate a draft record when the approver clicks, but the addToCart method defaults to the current logon user, is there any way to switch this user to someone else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 05:30 PM
Hi @Wei_ Ling
I don't know my comment is fit for your point, but let me comment as below.
I just take a look around this page, and I found 2 methods to update sys_user's id into "requestd_for".
One is "submitOrder()", and the other is "setRequestedFor()".
But it seems that the timing is different to be affected.
Not the timing of "addToCart", but the timing of "submitOrder" from the cart.
What do you think of using "setRequestedFor()" to replace the user?
Thanks,