Update Trust Account with Automation

Questions about and code samples for automation process code snippets within Select.
Post Reply
elimalone19
Posts: 23
Joined: Mon Jan 31, 2022 2:26 pm

Update Trust Account with Automation

Post 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.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Update Trust Account with Automation

Post 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.
Bob Richards, Senior Software Developer, SoftPro
elimalone19
Posts: 23
Joined: Mon Jan 31, 2022 2:26 pm

Re: Update Trust Account with Automation

Post 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.
elimalone19
Posts: 23
Joined: Mon Jan 31, 2022 2:26 pm

Re: Update Trust Account with Automation

Post 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)
elimalone19
Posts: 23
Joined: Mon Jan 31, 2022 2:26 pm

Re: Update Trust Account with Automation

Post 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.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Update Trust Account with Automation

Post 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.
Bob Richards, Senior Software Developer, SoftPro
Post Reply