Update Trust Account with Automation
-
- Posts: 24
- Joined: Mon Jan 31, 2022 2:26 pm
Update Trust Account with Automation
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.
-
- Posts: 1383
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Update Trust Account with Automation
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.
Bob Richards, Senior Software Developer, SoftPro
-
- Posts: 24
- Joined: Mon Jan 31, 2022 2:26 pm
Re: Update Trust Account with Automation
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.
-
- Posts: 24
- Joined: Mon Jan 31, 2022 2:26 pm
Re: Update Trust Account with Automation
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)
-
- Posts: 24
- Joined: Mon Jan 31, 2022 2:26 pm
Re: Update Trust Account with Automation
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.
-
- Posts: 1383
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Update Trust Account with Automation
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.
Knowledge is like jelly beans. We pick and choose what we want and assume all the rest are ear wax.
Bob Richards, Senior Software Developer, SoftPro
Re: Update Trust Account with Automation
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.