Alexey
Alexey

Reputation: 55

MS Dynamics-CRM How can I find GUID of the existing view by "Display Name" using JS?

I have category 1, category 2, and category 3. Cat1 is parent of cat2. Cat2 is parent of cat3. View for every category filtered by parent.

Problem: category 3 doesn't get filtered if cat2 is not specified when cat1 selected.

Need: in addition to existing functionality I need to be able to filter by grandparent as well.

My solution : What I'm doing now -> I am able to create a custom view. When on form load or on change of cat1 i'm running a script which sets a default custom view. But in this scenario - i need to change view back when category 2 is specified. (Because user can choose category 1 -> then category 2 and then 3). To set a default view I need to provide GUID of desired view.

Question1: is it the way to do it?

Question2: How can I find GUID of the existing view by "Display Name" using JS?

Thank you

Upvotes: 0

Views: 1516

Answers (1)

Alexey
Alexey

Reputation: 55

Actually, I don't know why I couldn't think of it before, but all what I need to do is to specify a second condition in the same query. "SELECT this FROM this WHERE cat1=1 and cat2=2

Upvotes: 0

Related Questions