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
Hi partner,
As André mentioned the details, and you didn't mention whether you set up a security policy, and you didn't show the class to handle operations related to required security policy.
Hi Jamal,
Is the SalesTypeTable restricted in an XDS policy? If so, the current method will not work as it tries to find records in the SalesTypeTable which is restricted for the user.
The coding is retrieving a record from the WorkerGroupTable, but this is not considered to fill the temporary table. What is the actual condition for knowing what sales types are allowed per user?
André Arnaud de Cal...
291,971
Super User 2025 Season 1
Martin Dráb
230,846
Most Valuable Professional
nmaenpaa
101,156