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

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

change Sales Order "Inserted By" user with file watcher

Postby indikad » Fri Feb 15, 2019 4:20 pm

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 ..)
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

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

Postby Mike.Sheen » Wed Feb 20, 2019 9:15 am

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

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

Postby indikad » Tue Mar 05, 2019 4:44 pm

Thanks Mike.
Would that be the same case in Stock Transfer as well ? ( the Created by user on the top right )
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

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

Postby Mike.Sheen » Tue Mar 26, 2019 3:01 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests