Blog

Microsoft Dynamics AX Blog

4

Happy new year :)

I got a SQL error today when I tried to open the “BI project generation options” form in Dynamics AX. The error was like the following:

When walked through the code, I discovered that it tries to delete some entries from a table called: “UDM Roles (BIUdmRoles) throw a SQL statement but unfortunately that SQL statement is mistyped!

To correct the issue, go to AOT –> Classes –> SRSStatement –> deleteInvalidBIUdmRoles method and write the code between my comments as below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//Amer Atiyah, http://blog.amerax.net/
public static void deleteInvalidBIUdmRoles()
{
    BIUdmRoles udmRoles;
    UserGroupInfo userGroupInfo;
    str list = #emptyString;
 
    Connection connection;
    Statement statement;
    SqlStatementExecutePermission permission;
 
    str sqlStatement = @"DELETE FROM %1BIUDMROLES WHERE USERGROUPID IN (%2)";
    ;
 
    while select udmRoles
    {
        select userGroupInfo where userGroupInfo.Id == udmRoles.UserGroupId;
        if (!userGroupInfo)
        {
            if (strlen(list) > 0)
            {
                list += #comma;
            }
            /*Comments Begin*/
            //list += udmRoles.UserGroupId;
            list += "'" + udmRoles.UserGroupId + "'";
            /*Comments End*/
        }
    }

Dynamics AX 2012 Event

Recent Posts

Tags

Archives

Random Testimonial

  • ~ Shibu Purushothaman, Sr. Programmer at WorleyParsons

    0bd63bf"Working with Amer was a pleasure. He is a true professional with in depth knowledge of Dynamics AX, .Net and other Microsoft Technologies. His professional approach to design, implementation and training made our migration to Axapta easy, and with very little down time. Another quality that I think deserves a special mention is that working with him is a pleasure, not even once did we feel uncomfortable with Axapta even though we were from a .net platform. He took time to attend to our doubts, and made the transition from .net to Axapta a very smooth ride. I highly recommend Amer and cant wait to work with him again."

  • Read more testimonials »