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"