web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

XDS with temporary tables

(0) ShareShare
ReportReport
Posted on by 5

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

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    303,383 Super User 2026 Season 1 on at

    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?

  • Suggested answer
    huijij Profile Picture
    19,811 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 514 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 390

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans