I have the following scenario in x++ that I need to implement in the SalesOrderHeaderV2 entity as a computed column:
switch (SalesTable.SalesStatus)
{
case SalesStatus::Backorder:
if (SalesTable.DocumentStatus == DocumentStatus::None ||
SalesTable.DocumentStatus == DocumentStatus::Confirmation)
{
return 'Value1';
}
break;
case SalesStatus::Delivered:
case SalesStatus::Invoiced:
return 'Value2';
break;
}
return '';
Can anyone please share how this could be converted as a computed field logic?