• Sundar Kanna 7
  • SMARTIE
  • 1812 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 101
    Replies
"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:-

@RestResource(urlMapping='/secureApexRest')
global with sharing class SecureApexRest {
    @HttpGet
    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:

TowerMapUtilClass:
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);
     }


TowerMapControllerClass:
public inherited sharing class TowerMapControllerClass {
     @AuraEnabled
     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;
     }
Towermap:
<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"/>
 
     </aura:if>
</aura:component>

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];
                    markers.push({
                        '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);
          });
          $A.enqueueAction(action);
     }
})

I also created the cutom object Tower.

Anyone know where my break is?

Thanks!

Erin
Did not seem difficult at all, however got 18% and failed on it after a month of learning on trailhead getting up to 75 badges and 1 superbadge before taking the exam.
Things I noticed, before I took exam I watched https://www.youtube.com/watch?v=lIZk8cKOFHk&t=6613s the person teaching is teaching in classic while a lot of trailhead is in lightning. He did help me visualize a  few questions on the test I would've had no clue on.
Things I would recommend studying is going to every profiles, user, permission sets, validation rule, object and flow and look at what you can and cannot do, and the default settings.
In object such and such pick 2 of 4 things you can do. In this thing what is true?

I'm thinking about retaking it in a week, its a good test, just wasnt ready for that. Thought it would be more scenarios rather than 'what are your options, what is default settings, what went wrong, what things could have not been done right'. It will get you if you are a second guesser or overthinker because you have a lot of options, a lot of questions I noticed you have to pick 2 out of 4 choices, meaning 2 times to second guess yourself in 1 question.

Definitely not easy, but felt like I was closer to passing score of 65% or around there, I felt like I had small chance to pass before hitting the submit answers. I had feeling I did have a feeling I wasn't going to pass before I started the exam but I took it anyways because I kept seeing the message "FAILURE IS AN OPTION". So I'm not too upset I failed, but disappointed. 

I'd say my reason for failure was that I was having too much fun in trailhead rather than specifically studying for subjects relating to ADMIN exam. I had over 35 minutes left after answering questions and went back to check answers too for 20 minutes, which I felt good with, but all in all, 18%.

My 2 cents. Good luck to anyone taking it, also look at the flashcards, I didn't look at them but now thinking I would've passed it if I did http://www.sfdc99.com/2014/10/02/guide-to-passing-all-salesforce-certifications/

 
  • May 11, 2018
  • Like
  • 1
Just failed my Admin 201 test. I'm so angry and frustrated. I took a ton of practice tests and did well on them. The actual test was nothing like the practice test. The actual test was ridiculously vague.  Anyway, does anyone know where I can find practice tests that are actually up-to-date? Any suggestions on how to study that doesn't cost a billion dollars? I'm just super frustrated and angry right now. Thanks for the help. 
Hi

I am on the Admin beginner module and currently on the last exercise where i need to install the app from appexchange. But whenever i try to get it now it prompts me for the credentials and i provide Playful credentials and it is not working.
Please advice what are the correct steps for the same

Thanks
Amit
all Salesforce certification SPRING 2017 dumps available anyone wants they can mail at spsfdc1992@gmail.com

I am new to Salesforce. I wan to self-learn and write Salesfroce Admin 201 certification in next month. Plz suggest me relavant links for reading, watcvhing videos etc. If you have any selfmade materials plz send it to my emailid chandra.skumar@outlook.com
Any advice based on your experience would be appreciated :) 

Thanks.

Hi,

Can any one please help me on this :

How many times we can reschedule a certification exam? Is there any limit or we can reschedule it many times?

Thanks
Q) What should a system administrator consider when deleting a custom field? (Select 3)
a. Existing field values must be transferred to a new custom field
b. Field values should be archived before a field is deleted
c. Fields used in a workflow and assignment rules cannot be deleted
d. Deleted fields and values can be restored from the recycle bin within 15 days
e. Fields must be remove from page layouts after being deleted

Which all 3 are correct answer because I am getting different answers on different websites and posts?
  • September 14, 2016
  • Like
  • 0
Hi everyone:

I'd like to study to the Salesforce Certified Platform Developer I exam, and it would be really helpful if you could tell me what are the best resources I can study from to pass the exam, besides the ones that are recommended in the study guide.

Regards,

Angel
Hi All,
Can anyone suggest me Websites where I can give Salesforce Admin 201 &401 Mock Exams and test my preparation.

Thanks In Advance.

Hi,

 

I am not sure where to post this so I am posing here.

 

I tried to download ADM201 – study guide from the below link but I am getting 6 page pdf file -

 

http://www.salesforce.com/in/services-training/training_certification/certification/

 

I assume there was something 50+ pages pdf file for ADM 201 study guide.

 

Anyone knows where to download correct ADM201 study guide?

 

Thanks.

 

Anyone from SFDC, pls correct the attachment(study guide). It is linking to wrong pdf.

  • July 25, 2011
  • Like
  • 1

I am trying to develop an online exam.

 

I was successful in keeping all the questions and writing class for them.

It works fine, but I need some questions which should be randomly picked from object.

Every time these questions should be different.

How can we achieve randomly ques from db?

 

Help me out at earliest.

Hi,

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,
Yash