The lookup still fails because @IsISOTrx@ gets inserted into the env.context as 'false' instead of 'N' ('N' converted to boolean converted back to string). This is done at the line line of:
This would cause the SQL lookup query to be correct in this case but I do not understand enough of the ramifications to know if this approach wouldn't cause problems elsewhere.
Attempting to set the Price List via lookup for *M_Order *creation using DataModel Create service:
{{DataField.column='M_PriceList_ID'
DataField.lval = '{some price list}'}}
will fail to construct the SQL lookup query if the env.context variable @IsISOTrx@ is not set first. However, if that *IsISOTrx *is set first:
{{DataField.column='IsSOTrx'
DataField.value = 'N'}}
The lookup still fails because @IsISOTrx@ gets inserted into the env.context as 'false' instead of 'N' ('N' converted to boolean converted back to string). This is done at the line line of:
org.idempiere.adinterface.ModelADServiceImpl.setValueAccordingToClass() :
Env.setContext(Env.getCtx(), 0, field.getColumn(), value==null ? null : value.toString());
Consider inserting the original string value into the context instead:
Env.setContext(Env.getCtx(), 0, field.getColumn(), strValue==null ? null : strValue);
This would cause the SQL lookup query to be correct in this case but I do not understand enough of the ramifications to know if this approach wouldn't cause problems elsewhere.