Salesforce Fact #388 | USING SCOPE in SOQL

Do you know there is a USING SCOPE clause in SOQL which utilizes some filterscopes to return records accordingly.

For example, To see the recently viewed Account records we can use MRU as filterscope like this:

SELECT ID,Name FROM Account USING SCOPE MRU

Similary, To see My Accounts we can use MINE as filterscope like this:

SELECT ID,Name FROM Account USING SCOPE MINE

For more details, please check https://developer.salesforce.com/docs/atlas.en-us.236.0.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_using_scope.htm

Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow