How can a suspended event be resumed where it left off, to avoid missing any events that were published during the suspension?
- Refresh the Event
- Resume the Event
- Resume the Event from New
- Resume the Event from Tip
Answer: Resume the Event
Which statement is true regarding events configured with the Publish Immediately behavior?
- Publish immediately Events count towards Apex DML limits
- EventBus.publish() returns how many platform events are configured to publish immediately.
- The events are published and do not depend on the successful completion of the transaction.
- Events published immediately prevent Apex callout from being performed after publishing.
Answer: The events are published and do not depend on the successful completion of the transaction.
What is the minimum code coverage requirement in order to promote and release an unlocked package?
- 70%
- 75%
- 85%
- 90%
Answer: 75%
When using WITH SECURITY_ENFORCED in a SELECT clause, what happens if a field referenced in the clause is inaccessible to the user?
- The query succeeds, but no data returned.
- The query succeeds, and null data set is returned.
- The query fails with an error indicating no access allowed.
- The query throws an exception indicating insufficient permission and no data is returned.
Answer: The query throws an exception indicating insufficient permission and no data is returned.
A developer wants to send a custom notification when an important event occurs. What can the developer use?
- Messaging.Custom Notification Class
- Messaging.Push Notification Class
- Messaging.Notification Action Class
- Messaging.Send Notification Class
Answer: Messaging.Custom Notification Class
A developer wants to check whether a user has a standard permission. Where should the developer import Salesforce permissions from in order to check this?
- @salesforce/hasPermission
- @salesforce/customPermission
- @salesforce/userPermission
- @salesforce/customPermission/namespace
Answer: @salesforce/userPermission
Answer: To observe changes when the field contains an array
What is the default behavior of the Lightning message service scope parameter?
- Active area Only
- Entire application
- Publisher message channel
- Active area and all hidden tabs
Answer: Active area only
HandsOn
Updated Code of class
@RestResource(urlMapping='/apexSecurityRest')
global with sharing class ApexSecurityRest {
@HttpGet
global static Contact doGet() {
Contact result;
Id recordId = RestContext.request.params.get('id');
List<Contact> results = [SELECT id, Name, Title, Top_Secret__c, Account.Name FROM Contact WHERE Id = :recordId];
SObjectAccessDecision securityDecision = Security.stripInaccessible(AccessType.READABLE, results);
SObjectAccessDecision securityDecision2 =
Security.stripInaccessible(AccessType.UPDATABLE,
[SELECT Description FROM Contact]
);
result.Description = result.Account?.Name;
return result;
}
public class FunctionalException extends Exception{}
public class SecurityException extends Exception{}
}
Thank you so much, it was so helpful
ReplyDelete