Page 1 of 1

change Sales Order "Inserted By" user with file watcher

PostPosted: Fri Feb 15, 2019 4:20 pm
by indikad
Jiwa 7.2
doing a csv import of a sales order via file watcher
I want to be able to change the user that is displayed in Snapshot drop down eg: "D01 - Inserted by Admin 15/02/2019 ..."
Currently jiwa uses the user id that I place on the Plugin Scheduler config file. But I want to be able change this during import ( different users for different orders etc ..)

Re: change Sales Order "Inserted By" user with file watcher  Topic is solved

PostPosted: Wed Feb 20, 2019 9:15 am
by Mike.Sheen
indikad wrote:Jiwa 7.2
doing a csv import of a sales order via file watcher
I want to be able to change the user that is displayed in Snapshot drop down eg: "D01 - Inserted by Admin 15/02/2019 ..."
Currently jiwa uses the user id that I place on the Plugin Scheduler config file. But I want to be able change this during import ( different users for different orders etc ..)


Hi Indika,

You cannot override that - it's always going to use the logged in user.

You can instead use the Staff property of the sales order - before the order is saved, invoke the SalesOrder.Staff.Read(ID) method. This will set the staff member seen on the top right of the sales order entry form.

Mike

Re: change Sales Order "Inserted By" user with file watcher

PostPosted: Tue Mar 05, 2019 4:44 pm
by indikad
Thanks Mike.
Would that be the same case in Stock Transfer as well ? ( the Created by user on the top right )

Re: change Sales Order "Inserted By" user with file watcher

PostPosted: Tue Mar 26, 2019 3:01 pm
by Mike.Sheen
indikad wrote:Thanks Mike.
Would that be the same case in Stock Transfer as well ? ( the Created by user on the top right )


No, you can set that easily enough - just invoke the ReadRecord method of the CreatedBy property of the stock transfer business logic.