Page 1 of 1

Update Trust Account with Automation

Posted: Wed Mar 15, 2023 5:38 pm
by elimalone19
Is there any way to update the trust account using a code snippet? We're adding a second trust account and we'd like to automate the selection of the account code.

Re: Update Trust Account with Automation

Posted: Fri Mar 17, 2023 11:27 am
by BobRichards
Yes. You can do this but you have to write the code in Python. Creating complex code in Automation is quite difficult since the environment was never designed to be utilized for heavy development. Unfortunately, the complexity of the code means that it is beyond scope for me to write it and attach it to this post.

Re: Update Trust Account with Automation

Posted: Fri Mar 17, 2023 1:34 pm
by elimalone19
Can you point me in the right direction to start? I'm quite familiar with python, I just don't know how to access the field I need.

Re: Update Trust Account with Automation

Posted: Mon Mar 20, 2023 1:27 pm
by elimalone19
I was able to figure out how to do this in a code snippet for anyone who is interested. Unfortunately I couldn't figure out how to dynamically pull a list of trust account guids in python so I had to get those from a database query and hard-code them in. I'd be interested to learn how to do that if anyone knows how. Additionally, this method appears to only work if the trust account has not yet been set. Once it has been set, it won't let you change it via automation.

Code: Select all

from System import *
from SoftPro.ClientModel import *
from SoftPro.OrderTracking.Client import *
from SoftPro.OrderTracking.Client.Orders import *

trust_account_guid = "GUID FROM DATABASE HERE"

IOrderItem.SetTag(Context, "TrustAccountId", trust_account_guid)

Re: Update Trust Account with Automation

Posted: Mon Mar 20, 2023 5:27 pm
by elimalone19
I've just been informed that this can be done without code at all! If you follow the automation Process Wizard prompts there is a section under "Then" that says "Assign a specific trust account". This is much easier and is the way it should be done. I hope this is helpful to anyone else who is trying to do this.

Re: Update Trust Account with Automation

Posted: Tue Mar 21, 2023 10:19 am
by BobRichards
Thank you for posting that answer! Alas, I am a developer and don't always know the capabilities of the UI.

Knowledge is like jelly beans. We pick and choose what we want and assume all the rest are ear wax.

Re: Update Trust Account with Automation

Posted: Mon Apr 15, 2024 12:57 pm
by aottilo
Can you please post a screen shot of your Wizard.. I do not see that on my software.. I am trying to write the code to pick a Trust account, but see that you found it in the Wizard.