I’m trying to check the “Allow SO Commitments” field in Purchase Order Entry using an Extender Enterprise Set Field Values action. However I’ve tried setting the value to 1 or TRUE or “TRUE”, I always get the error:
Type incompatibility ‘Allow SO Commitments’.
How can I set this field to be checked?
From a Dexterity perspective, Checkboxes and Boolean fields would be set to true or false.
Currently in Extender, there isn’t a way using the Set Field Values window as it doesn’t convert the constant value entered into the Boolean value required.
However, this is possible to do using the “Run Dynamics GP script” action since we can set the value via Dexterity sanScript.
The code used to do this is:
{Check to make sure that the field is not disabled}
if Field_GetBooleanProperty(‘Allow SO Commitments’ of window POP_PO_Entry
of form POP_PO_Entry, FIELD_PROP_DISABLED) = false then
{Check to see if already marked, if so then don’t need to re-mark it again}
if not(‘Allow SO Commitments’ of window POP_PO_Entry
of form POP_PO_Entry) then
{Wasn’t marked previously. Mark it}
‘Allow SO Commitments’ of window POP_PO_Entry
of form POP_PO_Entry = true;
{and run the field change script}
run script ‘Allow SO Commitments’ of window POP_PO_Entry
of form POP_PO_Entry;
end if;
end if;