Automation to add note if certain customer name chosen
Posted: Mon Sep 11, 2023 10:18 am
Good morning,
First time caller, long time listener. I don't know much about automation coding except what I self taught myself from existing automations (and piecing together notes from the forum), so bear with me! I (think) I'm getting close to figuring out the following automation, but I'm clearly missing a piece. The automation runs successfully (as in doesn't fail), but does not add the note. The point of the automation is to add a note when a certain broker is chosen so that it pops up as a reminder for the title examiner when issuing the title commitment. Any help you can give me would be greatly appreciated! Thanks! Callie
If:
First Time order is saved
Order has a contact (field is specific value)
{{Order.ListingAgentBrokers[0].People[0].LookupCode}} = TSCHULTZ
Order Status = In Process
Then (Code Snippet):
from System import *
from SoftPro.ClientModel import *
from SoftPro.Select.Client import *
from SoftPro.OrderTracking.Client.Orders import *
# Get an empty note from the order and get the Order object.
# If order is not context (i.e. Task is context), then use "order = Context.Root"
# Get the root order from the context
Order = Context.root
# Check if broker name = true
for People in Context.ListingAgentBrokers:
if People.LookupCode.startswith('TSCHULTZ'):
# Create a new note
note = IOrder.CreateNew(Context, 'Note')
note.Text = 'Tom Schultz requires all title documents to be merged into one single PDF'
note.Type = NoteType.Information
note.Catergories = None
note.DisplayOnOrderOpen = True
Context.Notes.Add(note)
First time caller, long time listener. I don't know much about automation coding except what I self taught myself from existing automations (and piecing together notes from the forum), so bear with me! I (think) I'm getting close to figuring out the following automation, but I'm clearly missing a piece. The automation runs successfully (as in doesn't fail), but does not add the note. The point of the automation is to add a note when a certain broker is chosen so that it pops up as a reminder for the title examiner when issuing the title commitment. Any help you can give me would be greatly appreciated! Thanks! Callie
If:
First Time order is saved
Order has a contact (field is specific value)
{{Order.ListingAgentBrokers[0].People[0].LookupCode}} = TSCHULTZ
Order Status = In Process
Then (Code Snippet):
from System import *
from SoftPro.ClientModel import *
from SoftPro.Select.Client import *
from SoftPro.OrderTracking.Client.Orders import *
# Get an empty note from the order and get the Order object.
# If order is not context (i.e. Task is context), then use "order = Context.Root"
# Get the root order from the context
Order = Context.root
# Check if broker name = true
for People in Context.ListingAgentBrokers:
if People.LookupCode.startswith('TSCHULTZ'):
# Create a new note
note = IOrder.CreateNew(Context, 'Note')
note.Text = 'Tom Schultz requires all title documents to be merged into one single PDF'
note.Type = NoteType.Information
note.Catergories = None
note.DisplayOnOrderOpen = True
Context.Notes.Add(note)