You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* user mode and API Update
Signed-off-by: Piotr PG Gajek <[email protected]>
* documentation update
Signed-off-by: Piotr PG Gajek <[email protected]>
---------
Signed-off-by: Piotr PG Gajek <[email protected]>
@@ -1682,6 +1683,28 @@ By default AccessLevel is set as `USER_MODE`.
1682
1683
1683
1684
More details you can find in [here](../advanced-usage/fls.md)
1684
1685
1686
+
### userMode
1687
+
1688
+
By default, all queries are executed `WITH USER_MODE`. However, developers can override this. For more details, check [Field-Level Security](../advanced-usage/fls.md) and [Sharing Rules](../advanced-usage/sharing.md).
1689
+
1690
+
The `userMode` method can be useful to override the `systemMode()` provided by the selector.
1691
+
1692
+
> Execution mode in which the object permissions, field-level security, and sharing rules of the current user are enforced.
1693
+
1694
+
**Signature**
1695
+
1696
+
```apex
1697
+
Queryable userMode()
1698
+
```
1699
+
1700
+
**Example**
1701
+
1702
+
```apex
1703
+
SOQL.of(Account.SObjectType)
1704
+
.userMode()
1705
+
.toList();
1706
+
```
1707
+
1685
1708
### systemMode
1686
1709
1687
1710
> Execution mode in which the the object and field-level permissions of the current user are ignored, and the record sharing rules are controlled by the class sharing keywords.
0 commit comments