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

  • ~ Muzammil Ahmad, ERP Manager at Abdul Aziz Alsorayai Investment Group

    33a1e92"Thing that I have seen in Amer in a broader view, that, he is a type of guy who takes the tasks in a professional way,concentrate on tasks, work on them with a cool & calm mind but fullfil the tasks in time. Having a humble nature, its normally a pleasure for everyone to work with Amer"

  • Read more testimonials »