Hello everyone,
I want to add an XDS policy to select the sales types allowed to the current user only. To do so, I was adviced to create a query that attach the SalesTypeTable to a temporary table MySalesTable (of type TempDB).
The xds() method in this temp table handles the selection based on the conditions mentioned above. However, when i try to select from the regular salesTypeTable, no line gets selected for some reason.
}
public class MySalesTable extends common
{
public RefreshFrequency xds()
{
MySalesTable mySales;
WorkerTable worker;
WorkerGroupTable workerGroup;
select firstonly workerGroup join worker where worker.WorkerGroup == workerGroup.RecId && worker.Worker == HcmWorkerLookup::currentWorker();
SalesTypeTable salesTypeTable;
insert_recordset mySales(SalesType)
select SalesType from salesTypeTable;
return RefreshFrequency::PerSession;
}
}
Regards,
Jamal