RE: Synchronization error on computed column
Hi Martin,
this the code that I call on Computed field:
str expression;
str roleTypeValue = SysComputedColumn::returnLiteral(DirPartyRoleType::Customer);
expression = strFmt(@"SELECT DirPartyView.RecId FROM DirPartyView
JOIN DIRPARTYTABLE on DirPartyView.PARTY = DIRPARTYTABLE.RECID
WHERE DIRPARTYTABLE.PARTYNUMBER = %1
and DirPartyView.RoleType = %2",
SysComputedColumn::returnField(tableStr(DirPartyV2Entity),
dataEntityDataSourceStr(DirPartyV2Entity, DirPartyBaseEntity), fieldStr(DirPartyV2Entity,
PartyNumber)), roleTypeValue);
return SysComputedColumn::if(
SysComputedColumn::isNotNullExpression(expression),
SysComputedColumn::returnLiteral(NoYes::Yes),
SysComputedColumn::returnLiteral(NoYes::No));