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

  • ~ Mohamad Adel, Sr. Dynamics AX Developer at Al-Fanar IT

    Adel"I recommend Amer Atiyah as i worked with him in many simple and complicated tasks and i realized that he is very intelligent in the way of thinking to solve tasks problems. He has a very good experience and knowledge of his job. He is very hard worker, committed, organized and creative and very open mind in his work and that is the reason if his brilliant in his specialized field. He is always showing a high degree of professionalism and ability to deliver and accomplish very complicated tasks at any condition with high quality. I am recommending him to work in any team and i know he will fit with all challenges. Purely, he is a professional guy. I wish to him more and more success in his career and his life."

  • Read more testimonials »