• Thomas John 2
  • -651 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 189
"Your Apex code contains field level access checks that are redundant now that you've added 'WITH SECURITY_ENFORCED'. Please check your code again."

Code is:-

global with sharing class SecureApexRest {
    global static Contact doGet(){
        Id recordId = RestContext.request.params.get('id');
        Contact result;
        if (recordId == null){
            throw new FunctionalException('Id parameter is required');
        if (Schema.SObjectType.Contact.isAccessible()
            && Schema.SObjectType.Contact.fields.Name.isAccessible()
            && Schema.SObjectType.Contact.fields.Secret_Key__c.isAccessible()){
            List<Contact> results = [SELECT id FROM Contact WHERE Id = :recordId WITH SECURITY_ENFORCED];
            if (!results.isEmpty()) {
                result = results[0];
        } else{
            throw new SecurityException('You don\'t have access to all contact fields required to use this API');
        return result;
    public class FunctionalException extends Exception{}
    public class SecurityException extends Exception{}

Kindly suggest me what exactly I need to change in the code.
Thanks inadvance.
Getting this error when I try to add my Towermaps to a new app builder page:
User-added image

Here are the codes I have based on the trailhead exercise:

public inherited sharing class TowerMapUtilClass {
     public static List<sObject> queryObjects(String theObject, List<String> theFields, String theFilter, String sortField, String sortOrder) {
          String theQuery = 'SELECT ' + string.join(theFields, ',');
          theQuery += ' FROM ' + theObject;
          if(!String.isEmpty(theFilter)) {
               theQuery += ' WHERE ' + theFilter;
          if(!String.isEmpty(sortField)) {
               theQuery += ' ORDER BY ' + sortField;
               if(!String.isEmpty(sortOrder)) {
                    theQuery += ' ' + sortOrder;
          return database.query(theQuery);

public inherited sharing class TowerMapControllerClass {
     public static List<Tower__c> getAllTowers() {
          String theObject = 'Tower__c';
          List<String> theFields = new List<String>{'Id', 'Name', 'State__r.Name', 'Tower_Location__Latitude__s', 'Tower_Location__Longitude__s'};
          String theFilter = '';
          String sortField = 'Name';
          String sortOrder = 'ASC';
          List<Tower__c> allTowers = TowerMapUtilClass.queryObjects(theObject, theFields, theFilter, sortField, sortOrder);
          return allTowers;
<aura:component implements="flexipage:availableForAllPageTypes" controller="TowerMapControllerClass" access="global" >
     <aura:attribute name="mapMarkers" type="Object" access="PRIVATE" />
     <aura:attribute name="markersTitle" type="String" access="PRIVATE" />
     <aura:handler name="init" value="{!this}" action="{!c.handleInit}"/>
     <aura:if isTrue="{!!empty(v.mapMarkers)}" >
          <lightning:map mapMarkers="{!v.mapMarkers}" markersTitle="{!v.markersTitle}" zoomLevel="5"/>

Towermap Controller:
     handleInit: function (component, event, helper) {
          helper.initHelper(component, event, helper);
Towermap Helper:
     initHelper : function(component, event, helper) {
          helper.utilSetMarkers(component, event, helper);
     utilSetMarkers : function(component, event, helper) {
          let action = component.get("c.getAllTowers");
          action.setCallback(this, function(response) {
               const data = response.getReturnValue();
               const dataSize = data.length;
               let markers = [];
               for(let i=0; i < dataSize; i += 1) {
                    const Tower = data[i];
                        'location': {
                             'Latitude' : Tower.Tower_Location__Latitude__s,
                             'Longitude' : Tower.Tower_Location__Longitude__s
                        'icon': 'utility:Tower',
                        'title' : Tower.Name,
                        'description' : Tower.Name + ' Tower Location at ' + Tower.State__r.Name
               component.set('v.markersTitle', 'Out and About Communications Tower Locations');
               component.set('v.mapMarkers', markers);

I also created the cutom object Tower.

Anyone know where my break is?


Hi everyone,

I am completed the Multiple choice questions for Platform Developer 2 as well as the  super badges, can someone help me to understand how do I get the certificate.

I have complete both requirements of PD 2 certificate, MCQ and Trailhead Badges. I have also linked my Webassessor account with trailhead account. It has been almost one week and I am still waiting for my certificate. I have raised mutiple cases for this but no response. My questions are :

1) Is it common for certificate to arrive late or is it just my case, please let me if anyone of you faced similar situation.
2) Is there any way to reach certificate team apart from guided help on the website.

Also any guess why does it take so long to award this certificate, once you have completed all the requirements. For example in case of proctored exam the certificate is awarded immediately. 

Best Regards,
Hi All,

I am having small confusion.Is dev-401 exam known as Platform dev-1 or is it different.

Hi Friends, I have all latest dumps of Salesforce exams Spring 2017 if anyone wants you can mail me at 
These are original questions from the certification exam and very useful to pass the exam.

I have all latest dumps of following exams
90% questions come from it

Salesforce Administrator (ADM 201)
Salesforce Sales Cloud Consultant (CON 201)
Salesforce Service Cloud Consultant
Platform Developer I
App Builder

Let me know if you want

Good Day!
I want to know about the preparation and skills required to clear the platform developer 2 certification in salesforce. I'm 2 years experienced in salesforce.

Thanks and Regards,
Shiva RV
Where i can get the latest dumps for salesforce pardot consultant and Marketing cloud?

I would like to get the Administrator certification, can be Salesforce Trailhead the correct way to pass the exam?

Can you please help me out by answering these questions.
A company wants a recruiting app that models candidates and interviews; displays the total number of interviews on each candidate record; and defines security on interview records that is independent from the security on candidate records.What would a developer do to accomplish this task? 
Choose 2 answers.
A) Create a lookup relationship between the Candidate and Interview objects.
B) Create a trigger on the Interview object that updates a field on the Candidate object
C) Create a roll-up summary field on the Candidate object that counts Interview records.
D) Create a master-detail relationship between the Candidate and Interview objects.
Hoping the Ans as :A,B

2) In the Lightning Component framework, which resource can be used to fire events?ans: A,B
Choose 2 answers
Third-party Javascript code.
Javascript controller actions.
Visualforce controller actions.
Third-party web service code.

Hoping as Ans: A,B

3) What is a capability of formula fields? 
   Choose 3 answer 
A) Generate a link using the HIPERLINK function to a specific record in a legacy system
B) Determine if a datetime field has passed using the NOW function
C) Determine which of three different images to display using IF function
D) Return and display a field value from another object using the VLOOKUP function
E) Display the previous value for a field using the PRIORVALUE funtion

I think Ans: B,C,D

4)A developer wants to display all the available record types for a case Object. The developer also wants to display the picklist values for the Case.Status field. The Case Object and the Case.Status field are on a Custom Visualforce page.
Which action can the developer perform to get the record types and picklist values in the controller?
Choose 2 answers. 
Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues()
Use Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos()
Use SOQL to query Case records in the org to get all values for the Status picklist field
Use SOQL to query Case records in the org to get all the RecordType values available for Case 

I think Ans:A,B

5) A developer writes a SOQL query to find child records for a specific parent. Ans:5


How many levels can be returned in a single query?

A. 1
B. 7
C. 5
D. 3
Confused between option A and C.Please clarify these questions.

Thanks in advance for your help.

I am working through this trail now and it seems like good info. Has anyone taken this trail and also the exam and can you tell me if its inclusive enough to prepare me for the certification exam? 
Hello all,

Thanks for looking at my question. I am new to SF and am trying to get certified in ADM 201 and DEV 401.

This question goes out to all certified developers and admins with the above completed, recently would be great.

Was looking at the following link:
and am very disapponted. Questions seem to be so specific that nothing my trainer taught me applies.

Want to know the following:
1. Is that exam realistic?
2. What is the best guide to study for the exam ... any suggestion/s are appreciated.
3. Length of time I can expect it will take to complete the same.

I looked at the questions posted previously by other users. Most of links in those replies are not active any more.
Thus I am choosing to post this again.

Thanks for your help,

I want dump question in Salesforce Administration Certification.


I want to do salesforce certification Dev 401 and DEV 501. We are partners of Salesforce, so can anybody tell me the exact price of the certification ?

Any pointers on these is highly appreciated.

Thank You,