First time using a Custom Fields in a Code Snippet
Posted: Thu Mar 21, 2019 6:31 pm
I am creating a Code Snippet that needs to check the value of a Custom Field, which I have added to several of the Order Contact Types. However, the editor is interpreting the "#" as the start of a comment rather than the balance of the code.
What do I need to change to get the custom field recognized as a field rather than a comment?
Any help in resolving this issue would be greatly appreciated.
Thank you
Code: Select all
from System import *
from SoftPro.ClientModel import *
from SoftPro.Select.Client import *
from SoftPro.OrderTracking.Client.Orders import *
def CreateTask
#Return True if PreTSG Task exists or (TypingTSG exists and the Order is not for a Pre-Tsg Servicer)
isPreTSG = False # Defaulted to False
if (any(c.Flueid_PreTSGServicer## == True for c in Order.Contacts)):
isPreTSG = True # Set to True when one of the Contact has the Pre-TSG Servicer Flag set to True.
# Return True if the Task Code is Not Empty and is either PreTSG or (TypingTSG and Not a Pre-TSG Servicer Order)
If any((task.Code is not None and (task.Code.lower() == 'pretsg' or (task.Code.lower() == 'typingtsg' and isPreTSG == False))) for task in Context.Tasks):
Return True
CreateTask()
Any help in resolving this issue would be greatly appreciated.
Thank you