Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Few view visible to one person

(0) ShareShare
ReportReport
Posted on by 828

Hi,

I am trying to make visible few  views to my customer, i am doing it via plugin and got the help from my this forum on code. But my situation is i want to make 2 or 3 views now and I am using fetch xml querry.

I am able to fetch one view, but fetching 2 or 3 view creating a problem.  Below is the code that I am using 

  ConditionExpression queryCondition = new ConditionExpression("name", ConditionOperator.Equal, "Authorized Contact");

                                       ConditionExpression queryCondition1 = new ConditionExpression("name", ConditionOperator.Equal, "Authorized User IDs");

                                       qe.Criteria.Conditions.Add(queryCondition);

                                       qe.Criteria.Conditions.Add(queryCondition1);

                                   }

The one view which i was able to see that also stopped working.

I also tried via making object

string[] values = new string[] { "Value1", "Value2" };
ConditionExpression cond = new ConditionExpression("name", ConditionOperator.In, values);

qe.Criteria.Conditions.Add(cond);

and 

string[] values = new string[] { "Value1", "Value2" }object value = values;
ConditionExpression c = new ConditionExpression("name", ConditionOperator.In, value);

and it also not seems to working.  Can anyone help me?

*This post is locked for comments

  • Ravi Fulani Profile Picture
    Ravi Fulani 828 on at
    RE: Few view visible to one person

    Hi Abby,

    Thanks for the help, the issue got resolved. I tried my code again and this time it seems to got working.

    Thank you.

  • Abby Kong Profile Picture
    Abby Kong 6 on at
    RE: Few view visible to one person

    Hi Ravi,

    Not sure what view you mean here, can you provide more details on what's not working?

    The ConditionExpression code looks fine, is the filter logic between queryCondition and queryCondition1 meant to be Or instead of default And?

    qe.Criteria.FilterOperator = LogicalOperator.Or;

    Regards,

    Abby

                       

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans