Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
MICROSOFT DYNAMICS AX 2012 R3 SECURITY

You're reading from   MICROSOFT DYNAMICS AX 2012 R3 SECURITY A quick guide to planning, designing, and debugging operational-level security for Microsoft Dynamics AX 2012 R3 implementations

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher Packt
ISBN-13 9781782175537
Length 106 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Ahmed Mohamed Rafik Moustafa Ahmed Mohamed Rafik Moustafa
Author Profile Icon Ahmed Mohamed Rafik Moustafa
Ahmed Mohamed Rafik Moustafa
Arrow right icon
View More author details
Toc

Debugging XDS policies


One of the most common issues reported when a new XDS policy is deployed is that an unexpected number of rows are being returned from a given constrained table. For example, more sales orders are being returned than expected if the sales order table is being constrained by a given customer group.

XDS provides a method to debug these errors. We will go over it now.

Review the SQL queries that have been generated. The X++ select has been extended with a command that instructs the underlying data access framework to generate the SQL query without actually executing it.

The following job runs a select query on SalesTable with a generated command. It then calls the getSQLStatement() method on SalesTable and dumps the output using the info API.

static void VerifySalesQuery(Args _args) 
{ 
 SalesTable salesTable; 
 XDSServices xdsServices = new XDSServices(); 
  xdsServices.setXDSContext(1, ''); 
  //Only generate SQL statement for custGroup table 
 select generateonly forceLiterals...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images