Assigning a Value to a Custom Field

Questions about and code samples for custom order rules and validation within Select.
Post Reply
B_Hinote
Posts: 57
Joined: Tue Jan 08, 2019 7:20 pm

Assigning a Value to a Custom Field

Post by B_Hinote »

I looked through other posts and based on everything I have reviewed it looks like I have defined this the way it should be, but it is not working.

I have a Custom Field that I have added to the Order Contact, which is called Corp_DesignatedTeam##
I want to assign a value to this field, but because of the hash marks that I cannot define this as I would a standard field.

As I understood it, I needed to define a fake function and then rename the function doing something like the following:

Code: Select all

def Order_DesignatedTeam(args):
	args.Value = 'Hello'

Order_DesignatedTeam.__name__ = 'Order_Corp_DesignatedTeam##_Value'
This does not work and I am guessing it has something to do with the underline in my field name. "i.e. Corp_Desig..."

What am I doing wrong?

Thank you
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Assigning a Value to a Custom Field

Post by BobRichards »

I bet you are right. Our parser looks for a specific pattern (IOrderItem_Property_Aspect) with two underscores. The addition of the third underscore is making the parser think this is not a COR. Try the custom field without the underscore. Let me know how it goes.
Bob Richards, Senior Software Developer, SoftPro
Post Reply