• RiteshKonduru
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Consultant
  • Deloitte

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 6
    Replies
Can't figure out what I'm doing wrong to get this:
Challenge Not yet complete... here's what's wrong:  The 'My Upcoming Shifts' report is not using the correct date range values.

My settings are:
User-added image
I've tried to set it these ways as well:
- Shift Start Time equals TODAY, NEXT 30 DAYS;
- Shift Start Time equals TODAY, NEXT 29 DAYS;
- Shift Start Time greater or equal TODAY and Shift Start Time less or equal NEXT 30 DAYS;
- Shift Start Time greater or equal TODAY and Shift Start Time less or equal NEXT 29 DAYS.

The related help page says that:
NEXT n DAYS for custom field filters, starts at 12:00:00 AM on the next day and continues for the next n days. (The range does not include today.)
For standard date filters it starts at 12:00:00 AM on the day that the report is run and continues for n days. (The range includes today.)

Where am I wrong?
Hi, 

I am facing this error while I have only displayed shift hours and grouped it with Volunteer Organization but still getting this error. 

Could anyone help me here.

Thanks in Advance.
Vinay Kumar Jain
Hi , I am also facing some problem with salesforce Trailhead SOQL injection Challenge, I tried many ways but still i am getting error .
can you suggest me where i am going wrong ?
​Thank you 


Simulate a SOQL Injection Attack
For this challenge, perform a SOQL injection on the search box to see information that is unintentionally exposed. Navigate to the SOQL Injection Challenge tab within the SOQL Injection application. You will see a search tool for the supply__c object. Use the search box to perform a SOQL injection which returns supplies meant for Nobles only. Hint: If you’ve done this successfully, your query should return one result containing Venison.

SOQL_Injection_Challenge:

public class SOQL_Injection_Challenge {

    public string textual {get; set;}
    public List<Supply__c> whereclause_records {get; set;}



//SELECT Id,Name,Quantity__c,Storage_Location__c,Type__c FROM Supply__c
    public PageReference whereclause_search(){
        string query = 'SELECT Id,Name,Quantity__c,Storage_Location__c,Storage_Location__r.Castle__c,Type__c FROM Supply__c';
        string whereClause = '';

        if(textual != null && textual!=''){
                whereClause += 'name like  \'%'+textual+'%\' ';
        }

        if(whereClause != ''){
            whereclause_records = database.query(query+' where '+whereClause+' Limit 10');
            validate(whereClause,whereclause_records.size());
        }

        return null;
    }


    public void validate(string s, integer i){
      if(s.contains('\'%') && s.containsIgnoreCase('Nobles_Only__c') && s.contains('%\'') && i<10){
        cvcs__c  v = cvcs__c.getInstance('sic1');
        if(v==null){
          v = new  cvcs__c(name='sic1',c1__c = 1);
        } else {
            v.c1__c += 1;
        }
        upsert v;
      }
    } 

}
  • September 21, 2017
  • Like
  • 0

Hi all, I am so close to finishing this process automation badge but am stuck in one area in Step 7.

I've built out my process builder as follows

User-added image
User-added image
User-added image

And my date formula as follows
 

Case(MOD(Date__c-DATE(1900,1,7),7),0,"Sunday",1,"Monday",2,"Tuesday",3,"Wednesday",4,"Thursday",5, "Friday",6,"Saturday", "")
 



Challenge Not yet complete... here's what's wrong:  The Robot Setup Day of the Week formula does not seem to be working properly. The Day of the Week should not fall on Saturday or Sunday. 

It works nicely but doesn't seem to pass, what could be up.
 

My code is given below. It displays error to me:
Error: Compile Error: Method does not exist or incorrect signature: [Schema.DescribeFieldResult].isCreatable() at line 44 column 25
 
public with sharing class CRUD_FLS_Create_Challenge{

    public Id newUser {get;set;}
    
    public List<Personnel__c> getUnReg() {
        unregisteredUsers = new List<Personnel__c>();
       List<Jouster__c> currentParticipants = [ select Participant_Name__r.Name from Jouster__c ];
       List<Personnel__c> currentPersonnel = [ select Id, Name, Favorite_Color__c, Castle__r.Name from Personnel__c limit 15];
       Boolean reg;
       
       System.debug(currentParticipants);
       System.debug(currentPersonnel);
       
       for( Personnel__c p : currentPersonnel)
       {
           reg = false;
           for(Jouster__c j : currentParticipants)
           {
               if(j.Participant_Name__r.Name == p.Name) {
                   reg = true;
                   break;
               }
           }
           
           if(reg == false)
               unregisteredUsers.add(p);
       }
       
       System.debug(unregisteredUsers);
       
       return unregisteredUsers;
    }

    public Jouster__c newParticipant {get;set;}
    public List<Personnel__c> unregisteredUsers;
    
    
    public void register(){
        System.debug(newUser);
        Personnel__c p = [select Name, Favorite_Color__c, Castle__r.Name from Personnel__c where Id =: newUser]; 
        if (!Schema.sObjectType.Jouster__c.fields.Participant_Name__c.isCreatable()) {
            if (!Schema.sObjectType.Jouster__c.fields.Color__c.isCreatable()) {
                if(!Schema.sObjectType.Jouster__c.fields.Favorite_Color__c.isCreatable()) {  
                    if(!Schema.sObjectType.Jouster__c.fields.Castle__c.isCreatable()) {   
                        ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Insufficient Access'));                 
                    }
                }
            }  
        }
        if([select id from Jouster__c where Participant_Name__r.Name =: p.Name] != null)
            insert new Jouster__c(Participant_Name__c=newUser, Color__c=p.Favorite_Color__c, Castle__c=p.Castle__c);
        else
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Jouster already entered in Tournament'));
    }    
    public string[] getPermSets(){
        String[] permSetArray = new List<string>();
        PermSetArray.add('User with Read ONLY Access to the Jousters object'); // description of the needed permission set
        return permSetArray;
    }

}

 

Hello Everyone,

-          I am new to the force.com platform and had two general questions about development in eclipse via the Force.com IDE plug-in.

-          If the following features are not available in eclipse, is there another editor that is recommended that is more robust then eclipse that does have these features.

1.)    Mark Occurrences: When clicking on a variable, all occurrences of this variable are highlighted. This is available for Java development…Window -> Preferences -> Java -> Editor -> Mark Occurrences.

2.)    Ctrl Click to “Show Declaration” or “Show Implementation”.

 

NOTE: I have both Eclipse IDE for Jave EE (Juno) and Eclipse Classic 4.2.2

Hi, 

I am facing this error while I have only displayed shift hours and grouped it with Volunteer Organization but still getting this error. 

Could anyone help me here.

Thanks in Advance.
Vinay Kumar Jain