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

  • ~ Mohammad A-Awami, Dynamics AX Specialist at WorleyParsons

    AlAwami"I worked with Amer for WorleyParsons. I found him very cooperative. He is able to help me in a lot of issues that related to ax. His ability to solve the problems is fascinating me. It is so fast and done on the best practice. His ability on business analysis and implantation are done on the best methods."

  • Read more testimonials »