Sample method how to write Computed column method in x++
public static server str getSalesLineRecid()
{
str SalesLineRecidLoc;
str RecidLoc = SysComputedColumn::returnField(tablestr(SalesOrderLineV2Entity), identifierstr(SalesLine), fieldstr(SalesLine, RecId));
str DataAreaIdLoc = SysComputedColumn::returnField(tablestr(SalesOrderLineV2Entity), identifierstr(SalesLine), fieldstr(SalesLine, DataAreaId));
SalesLineRecidLoc = strFmt(@"select top 1 SalesLine.RecId from SalesLine where SalesLine.RecId = %1 and SalesLine.DataAreaId = %2", RecidLoc,DataAreaIdLoc);
return SalesLineRecidLoc;
}
Comments
Post a Comment