function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KayalKayal 

How to set Filter Criteria in a new view(Contact/Case/Opportunity)

It is possible to create a new view for any record say Contact/Case/Task. Is it possible to set the Filter Criteria of the new view programatically? I just want to make use of the created view for different Filter Criterias.

For example: I'm creating a new view "MyCustomCaseView" for Case. And setting the two Filter Criterias as:
Filter Criteria1: "Status" "not equal to" "Closed" and

Filter Criteria2: "Case Origin" "equals" "Phone"

 

So is it possible to change this filter criteria say i need this Filter Criteria2 to be set as: "Priority" "equals" "High"? Is it possible to query the available views for the record(Contact/Case/Task) using SOQL?
Thanks in advance.

 

-Kayal