Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Error in reports when applying XDS

(0) ShareShare
ReportReport
Posted on by 321
I created a xds policy on CustTable.. the system restricts the forms and the reports according to data related to CustTable, Ex:- All Customers form shows only specific customer, etc..
 
When I open Customer aging report.. the report works fine, when I go to "records to include" tab I find 2 default filters (Customer account and customer group) when I enter values in these fields and generate the report.. everything works fine.
 
 
The problem occurs when I filter using another field:
 
 
I get these errors:
1- "Cannot insert multiple records in Customer or vendor account number (CustVendTransAging). The SQL database has issued an error.
 
2- "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The column name 'ACCOUNTNUM' is specified more than once in the SET clause or column list of an INSERT. A column cannot be assigned more than one value in the same clause. Modify the clause to make sure that a column is updated only once. If this statement updates or inserts columns into a view, column aliasing can conceal the duplication in your code."
 
3- "INSERT INTO tempdb."DBO".t13749IISdvhd10039vm_710304_1353304698FA4561968F38250A4E8450 (ACCOUNTNUM,GROUPID,ACCOUNTNUM,GROUPID) SELECT T1.ACCOUNTNUM AS f1,T1.CUSTGROUP AS f2,1 AS RECVERSION,5637144576 AS PARTITION FROM CUSTTABLE T1 LEFT OUTER JOIN HCMWORKER T2 ON ((T2.PARTITION=5637144576) AND (T1.MAINCONTACTWORKER=T2.RECID)) LEFT OUTER JOIN DIRPARTYTABLE T3 ON (((T3.PARTITION=5637144576) AND (T2.PERSON=T3.RECID)) AND (T3.INSTANCERELATIONTYPE IN (3738) )) WHERE (((T1.PARTITION=5637144576) AND (T1.DATAAREAID=N'adc')) AND (T3.NAME=N'Jonathan McAdams')) AND EXISTS (SELECT 'CustTablePolicy' FROM XDS_CUSTTABLE T4 WHERE (((T4.PARTITION=5637144576) AND (T4.DATAAREAID=N'adc')) AND (((T4.USERGROUPID=N'FIN') OR (T4.USERGROUPID=N'test2')) AND (T1.ACCOUNTNUM=T4.CUSTACCOUNT)))) ORDER BY T1.MAINCONTACTWORKER"
Categories:
  • AbdullahAhmed_ Profile Picture
    321 on at
    Error in reports when applying XDS
    Hello, Mr. Andre...
     
    It's a normal query joining 2 tables... the XDS_CustTable table is a regular table:
     
     
    and here's the policy:
     
  • André Arnaud de Calavon Profile Picture
    294,118 Super User 2025 Season 1 on at
    Error in reports when applying XDS
    HI Abdullah,
     
    Can you provide some information about how you created the policy? What is the primary table and how did you define the query for the 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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,118 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans