web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Lookup not work when Changing Company

(0) ShareShare
ReportReport
Posted on by 916

Hello,

We added a lookup based on EDT relation in a form , everything  works fine with admin.

Now , for the usr1 we added the "system user" role and another specific role "role2".For both role we have assigned organisation as :

1346.Capture.JPG

Now ,everything  works fine when we connect with usr1 to company1 for the first time , so when we switch to company2 the lookup don't get data.

But when we start to connect for the first time with the company2 it works but in the company1 does not works.

the problem is when we switch the company to another , but i can't identify why is not work

Any idea for this issue?

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Make sure your user has System User security role as well, that is needed for a lot of basic functionality in AX.

    Did you try to have a look in a Trace to see what SQL statement is executing to fetch the values for the lookup? That might reveal the issue if it is access rights related or something similar (virtual company account, table perspective, shared vs. company-specific table, etc.)

  • Suggested answer
    Andrew Xu Profile Picture
    3,877 on at

    Alex,

    This sounds weird, but did you test with a table relation instead of keeping using the EDT relation?

  • ALAhmed Profile Picture
    916 on at

    Thank you for the reply.

    I tried to create field control on the form with lookup method , but i have the same result.

    still looking for asolution

  • ALAhmed Profile Picture
    916 on at

    I was able to identify the reason why is not work ,the client has implimented the XDS framwrok.

    Here i look for undersanding why is not work with XDS security policies

  • Andrew Xu Profile Picture
    3,877 on at

    The XDS your client implemented only works when user changes company? What happens if you disable the XDS for that user?

  • ALAhmed Profile Picture
    916 on at

    Thank you for your reply so far, much appreciated. 

    The client has created a query lik this :

    5657.XDS1.JPG

    In the method we have :

    public static RecId CostCenterDimensionAttribute()
    {
        return DimensionAttribute::findByName("XXX").RecId;
    }


    And the security policies was created as :

    5657.XDS1.JPG

    When i make constrainedTable property on No , everyThing works fine.

    How can i let this property on yes and the user can view the data in the lookup when changing company.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You could set XDS state on or off for specific piece of code, we do that to lift up security for certain areas to get over the framework knowingly. It is possible through the XDSServices class, have a search on it.

    msdn.microsoft.com/.../xdsservices.setxdsstate.aspx

  • ALAhmed Profile Picture
    916 on at

    Thank you for the reply.
    Current lookup on standard Form is because of realationship EDT

    I overridied lookup method on form DataSource.The custom lookup implement XDSServices.setXDSState(0) as :

    XDS3.JPG

    It still not working if i change the company

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans