I have a custom field that I need to make read only since we will not be using it anymore. The field is Order.Title.TitleProducts.RecInfoRestrictiveCovenants_150171#
The Context shows Order:Title:Commitment
What am I doing wrong here? I cannot get it to work.
from System import *
from SoftPro.ClientModel import *
from SoftPro.OrderTracking.Client import *
from SoftPro.OrderTracking.Client.Orders import *
#Rule logic with a non-COR style style name
def RestrictiveCovenants(args):
order = args.Context
args.Value = True
#Rename rule
RestrictiveCovenants._name_ = 'Commitment_RecInfoRestrictiveCovenants_150171#_ReadOnly'
Make Custom Field Read Only
-
- Posts: 1383
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Make Custom Field Read Only
Please post your code inside code tags (the </> button above) so the browser doesn't mess up the spacing.
Be aware that in Python, the property "__name__" as two underscores at the beginning and at the end. It can be difficult to see.
Be aware that in Python, the property "__name__" as two underscores at the beginning and at the end. It can be difficult to see.
Code: Select all
RestrictiveCovenants.__name__ = 'Commitment_RecInfoRestrictiveCovenants_150171#_ReadOnly'
Bob Richards, Senior Software Developer, SoftPro
-
- Posts: 27
- Joined: Wed Sep 26, 2018 1:24 pm
Re: Make Custom Field Read Only
That was the issue, I only had one underscore before and after. Thank you!