How to restrict Access Groups constraints to only the particular screen

Hi,

While using access group constraints, if I write query to any Entity then this is effecting in the entire application where ever i used that entity. But I want to implement that query impact only to the particular screen. How can I do this.

Thanks!!

Hi,

Please check this answer. It seems to be exactly your case too.

I have gone through the link that you have attached.
But by using that I am able to get only one country while creating for that screen, By viewing that screen I am able to see all the countries.
Previously I used access groups to see only one country while viewing the screen by using constraint like {E}.country=1, but this is applying entire application. I want this only for particular screen.

Thanks!!

You can expand the same logic on browser screen too. Use the same specific permissions to filter the datasource in the init() method of this screen.

In browser screen by applying the followed query it is not showing any data, but in database it is giving the result.

       <query>
            <![CDATA[select e from demo$Order e where e.country in :custom$countries and e.crop in :custom$crops]]>
        </query>

Can you say me, why I am getting 0 records for this.

Thanks!!

If you use the custom prefix, you should explicitly call the refresh() method of the datasource in the init() method.