• sagarika b
  • NEWBIE
  • 114 Points
  • Member since 2017

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 42
    Replies
The following example in Trail "Developer Beginner/Apex Basics & Database: Write SOSL Queries" is incorrect: 
"This search uses the OR logical operator. It returns records with fields containing the Wingo word or records with fields containing the SFDC word."  
The last part should say "...containing the Man word." rather than "...containing the SFDC word."
Unable to save case record with attachment, code as follows,help will be appreciated.
 
<apex:page standardController="Case" Extensions="CaseHandlerExtn" ShowHeader="False">
<apex:form >
<apex:pageBlock Title="Submit a Case" >
<apex:PageBlockSection Title="Section 1" columns="1">
<apex:PageblockSectionItem >
<apex:outputLabel >Contact Name</apex:outputLabel>
<apex:InputField Id="Id1" value="{!Case.ContactId}"/>
</apex:PageblockSectionItem>
<apex:PageblockSectionItem >
<apex:outputLabel >Email</apex:outputLabel>
<apex:inputField Id="Id2" value="{!Case.ContactEmail}" />
</apex:PageblockSectionItem>
<apex:PageblockSectionItem >
<apex:outputLabel >Subject</apex:outputLabel>
<apex:inputField Id="Id2" value="{!Case.subject}" />
</apex:PageblockSectionItem>
<apex:PageblockSectionItem >
<apex:outputLabel >Description</apex:outputLabel>
<apex:inputField Id="Id2" value="{!Case.Description}" />
</apex:PageblockSectionItem>
</apex:PageBlockSection>
<apex:pageBlockButtons >

<apex:commandButton Id="Cancel" action="{!Cancel}" Value="Cancel" />

</apex:pageBlockButtons>
<apex:pageBlock title="Upload Attachment">
            <apex:inputFile style="width:100%" id="fileToUpload" value="{!fileBody}" filename="{!fileName}" />
            <apex:commandButton value="Upload Attachment" action="{!UploadFile}"/>
            <apex:commandButton Id="save" action="{!Save}" value="Save" />
       </apex:pageBlock>
</apex:pageBlock>
</apex:form>  
</apex:page>
 
Public Class CaseHandlerExtn {

Public attachment Atchmnt {get;set;}
Public Case Cs{get;set;}
Public Blob Filebody{get;set;}
Public String FileName{get;set;}
Public Id RecId {get;set;}

//Public Contact Con{get;set;}

Public CaseHandlerExtn (Apexpages.StandardController StndCntlr){
      Atchmnt = New attachment();
       RecId = StndCntlr.getRecord().Id; 
      Cs = New Case(status='New',Origin='Web');    
         }
         
 Public Void SaveCase(){
  insert Cs;
  Atchmnt.ParentId=Cs.Id;
  Insert Atchmnt ;
   
  }
  
  public PageReference UploadFile()
    {
        PageReference pr;
        if(fileBody != null && fileName != null)
        {
          Attachment myAttachment  = new Attachment();
          myAttachment.Body = fileBody;
          myAttachment.Name = fileName;
          myAttachment.ParentId = recId;
          insert myAttachment;
           pr = new PageReference('/' + myAttachment.Id);
           pr.setRedirect(true);
           return pr;
        }
        return null;
    }      
}


 
Hi,
I have a Salesforce community using the customer community plus license.
When I go to manage the community, Administration, Tabs, the Documents tab is not in the list of Available Tabs.
Has anyone any idea why not?
thanks
The following example in Trail "Developer Beginner/Apex Basics & Database: Write SOSL Queries" is incorrect: 
"This search uses the OR logical operator. It returns records with fields containing the Wingo word or records with fields containing the SFDC word."  
The last part should say "...containing the Man word." rather than "...containing the SFDC word."
Modify the newurlPolicyCondition Apex class
Modify the newurlPolicyCondition Apex class you created in an earlier challenge and change its condition as outlined in the requirements below. 

Modify the following apex class: newurlPolicyCondition
Change the platform condition
Old platform condition value: eObj.Platform == 'useanewtrailheadplayground'
New platform condition value: eObj.Platform == 'besupercarefulwiththis'


Thank you very much in advance.
Dominik
I am getting the following error on this trailhead: Account setup for challenge incomplete. Please add 'Prospect', 'Customer' and 'Pending' picklist values to the Account 'Type' field

This is for the challenge that says "Create an approval process that validates when a Prospect Account becomes a Customer."

The problem is I don't see the options to add Pending and some of the others like Customer. This is what I see, please help:
User-added image
 
HI,


    How to write the test class for the below code 


    public class CaseUserHelper {

    public static void updateCaseStage(List<Case> cases) {
    
             List<ID> cIds = new List<ID>();
        
             List<Case_User__c> cuser = New  List<Case_User__c>();
             Map<ID, Case_User__c> cusermap = new Map<ID, Case_User__c>();

             Set<String> skillSet = new Set<String>();
             List<String> skillSetList = new List<String>();
    
             for(Case c: cases){
        
                   if(c.Status == 'New') {
                   cIds.add(c.Id); //add case ids.
                   }     
                   skillSet.add(c.CaseRelatedTo__c);
             }   
           skillSetList.addAll(skillSet);    
        
         //available users               
           try{
                   List<Case_User__c> availableCaseUsers = [SELECT AvailableUsers__c, Timings__c, SkillSet__c  FROM Case_User__c where Availability__c = TRUE ORDER BY Last_Case_Allocated_Time__c ASC];
                 //List<Case_User__c> availableCaseUsers = Database.query(queryString);
                    integer i=0;
                    integer nomatchingSkillset = availableCaseUsers.size();
                    for(Case c: cases){
                        for(; i<=availableCaseUsers.size();i++){
                        if(availableCaseUsers.get(i).SkillSet__c.contains(c.CaseRelatedTo__c)){
                          c.OwnerId = availableCaseUsers.get(i).AvailableUsers__c;
                          availableCaseUsers.get(i).Last_Case_Allocated_Time__c = DateTime.now();
                          cusermap.put(availableCaseUsers.get(i).id, availableCaseUsers.get(i));
                         } else {
                              nomatchingSkillset--;
                              if(nomatchingSkillset == 0){
                                  //TODO assign to case queue
                                  
                                     User u =[SELECT Email FROM User WHERE Id IN (SELECT UserOrGroupId FROM GroupMember WHERE Group.DeveloperName ='CaseQueue')];
                                     String us = u.Email;
                                                          
                                      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                                      String[] toAddresses = new String[] {us};
                                      mail.setToAddresses(toAddresses );
                                      mail.setSubject('No Users available to handle this case');
                                      mail.plainTextBody='handle this case';
                                      Messaging.SendEmail(new Messaging.SingleEmailMessage[] {mail});
                                                          
                                  break;
                              }
                              continue;
                        }
                        if(i>=availableCaseUsers.size()){
                            i=0;
                        }
                        break;
                     }      
                }
            }catch(System.DmlException e){
            
                 System.debug('Missing the required field in record');
                 
            }catch(Exception e){
            
                 System.debug('An Error Occured at:' +e.getMessage());
                 
            }finally{
            
                 System.debug('This is block just for closing the class');
            }      
          
 
     if(!cusermap.isEmpty()) {
      update cusermap.values();
     }

        
   }
}

and trigger is 

trigger CaseUserHelperTrigger on Case(before insert,before update){     

        CaseUserHelper.updateCaseStage(Trigger.new);
}

could you please anyone help

Thanks In Advance
Hi,

    How to write the trigger in apex class ?

    trigger UpdatedCaseUserTrigger on Case (before insert,before update) {

   List<ID> cIds = new List<ID>();
       
    List<Case_User__c> cuser = New  List<Case_User__c>();
    Map<ID, Case_User__c> cusermap = new Map<ID, Case_User__c>();

    Set<String> skillSet = new Set<String>();
    List<String> skillSetList = new List<String>();
    
    for(Case c : Trigger.new){
        
        if(c.Status == 'New') {
            cIds.add(c.Id); //add case ids.
        }     
        skillSet.add(c.CaseRelatedTo__c);
     }   
     skillSetList.addAll(skillSet);    
        
         //available users               
         List<Case> cases = Trigger.new;
         List<Case_User__c> availableCaseUsers = [SELECT AvailableUsers__c, Timings__c, SkillSet__c FROM Case_User__c where Availability__c = TRUE ORDER BY Last_Case_Allocated_Time__c ASC];
         //List<Case_User__c> availableCaseUsers = Database.query(queryString);
         integer i=0;
         integer nomatchingSkillset = availableCaseUsers.size();
         for(Case c: cases){
             for(; i<=availableCaseUsers.size();i++){
                if(availableCaseUsers.get(i).SkillSet__c.contains(c.CaseRelatedTo__c)){
                  c.OwnerId = availableCaseUsers.get(i).AvailableUsers__c;
                  availableCaseUsers.get(i).Last_Case_Allocated_Time__c = DateTime.now();
                  cusermap.put(availableCaseUsers.get(i).id, availableCaseUsers.get(i));
                } else {
                      nomatchingSkillset--;
                      if(nomatchingSkillset == 0){
                          //TODO assign to case queue
                          
                           User u =[SELECT Email FROM User WHERE Id IN (SELECT UserOrGroupId FROM GroupMember WHERE Group.DeveloperName ='CaseQueue')];
                            String us = u.Email;
                                                  
                              Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                              String[] toAddresses = new String[] {us};
                              mail.setToAddresses(toAddresses );
                              mail.setSubject('No Users available to handle this case');
                              mail.plainTextBody='handle this case';
                              Messaging.SendEmail(new Messaging.SingleEmailMessage[] {mail});
                                                  
                          break;
                      }
                      continue;
                }
                if(i>=availableCaseUsers.size()){
                    i=0;
                }
                break;
             }      
         }
        
      
 
     if(!cusermap.isEmpty()) {
      update cusermap.values();
     }
        
   
   }

Could anyone help me to convert 

Thanks

HI

I  am having my command line good and working.I am having 6 processes in my bean file to upsert or insert data in to salesforce.

Each will be using different mapping file, and different CSV files from local folder.
I am trying to schedule the dataloader to  run,every day 3AM EST.
So how can i run all the six processes in one bean files?
Do i need to create differnt bean file for each processes.I am not able to get that.
 

Could someone please guide me with the system requirements if any and step by step process .
Thanks in advance.
 

Error: Incorrect parameter type for function 'AND()'. Expected Boolean, received Text 

AND(Last_Name__c,
       OR(
             ISBLANK(Phone__c),
             ISBLANK(Email__c)
            )
       ) ...Any one help me why i am getting this error
I am working on the "Add Selectors That Allow Users to Filter the Dashboard Results" Wave module in Trailhead, and the challenge is "
You already created list widgets for opportunity owner and stage, but being able to filter by product family can help your sales team focus on the sales for each product line. Create a third list widget for product family in the Sales Performance dashboard. Update the widget title, then save the dashboard.

Dashboard: Sales Performance
App: My Private App
Widget Title: Product Family
There are 5 sections in this modules, this is the 4th.  In the 2nd section, I created the Sales Performance dashboard.  Since passing the 2nd section, I have completed one multiple choice challenge, no other changes have been made in the org.  

When submitting the challenge, I receive the following error
Challenge Not yet complete... here's what's wrong:&nbsp; There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: BSLZQUSC
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: BSLZQUSC
"
 
I have created 2 new Wave Dev accounts, and with my existing account and the two new dev accounts, I receive the error.  Any ideas?
The lightning experience does not allow in creating a custom object named "Battle Station" with a space.  
The specified name in the trailhead project is "Battle Station" with a space in between.

How do I get the lightning experience to allow space in custom object name?
I am having a great deal of issues.  My hands on organzation is no longer to be found I get the error message below when I try to long into it.  
I created a second playground but now when I try to check the challenge the Trail bot says it can't check it because they can't find the report.

HELP!!!

404
TRAIL NOT FOUND
Sorry, that page doesn't exist. Try retracing your steps or review the URL.
I am working on the 'Set Up Social Sign-On' assignment under 'Identity for Customers'-trail. I have done the previous tasks as supposed to, and everything has worked fine. Until this; I cannot seem to get the Facebook- or Google logo's on the sign in page for communities(both partners and Customers). Can anybody please advise?
Unable to save case record with attachment, code as follows,help will be appreciated.
 
<apex:page standardController="Case" Extensions="CaseHandlerExtn" ShowHeader="False">
<apex:form >
<apex:pageBlock Title="Submit a Case" >
<apex:PageBlockSection Title="Section 1" columns="1">
<apex:PageblockSectionItem >
<apex:outputLabel >Contact Name</apex:outputLabel>
<apex:InputField Id="Id1" value="{!Case.ContactId}"/>
</apex:PageblockSectionItem>
<apex:PageblockSectionItem >
<apex:outputLabel >Email</apex:outputLabel>
<apex:inputField Id="Id2" value="{!Case.ContactEmail}" />
</apex:PageblockSectionItem>
<apex:PageblockSectionItem >
<apex:outputLabel >Subject</apex:outputLabel>
<apex:inputField Id="Id2" value="{!Case.subject}" />
</apex:PageblockSectionItem>
<apex:PageblockSectionItem >
<apex:outputLabel >Description</apex:outputLabel>
<apex:inputField Id="Id2" value="{!Case.Description}" />
</apex:PageblockSectionItem>
</apex:PageBlockSection>
<apex:pageBlockButtons >

<apex:commandButton Id="Cancel" action="{!Cancel}" Value="Cancel" />

</apex:pageBlockButtons>
<apex:pageBlock title="Upload Attachment">
            <apex:inputFile style="width:100%" id="fileToUpload" value="{!fileBody}" filename="{!fileName}" />
            <apex:commandButton value="Upload Attachment" action="{!UploadFile}"/>
            <apex:commandButton Id="save" action="{!Save}" value="Save" />
       </apex:pageBlock>
</apex:pageBlock>
</apex:form>  
</apex:page>
 
Public Class CaseHandlerExtn {

Public attachment Atchmnt {get;set;}
Public Case Cs{get;set;}
Public Blob Filebody{get;set;}
Public String FileName{get;set;}
Public Id RecId {get;set;}

//Public Contact Con{get;set;}

Public CaseHandlerExtn (Apexpages.StandardController StndCntlr){
      Atchmnt = New attachment();
       RecId = StndCntlr.getRecord().Id; 
      Cs = New Case(status='New',Origin='Web');    
         }
         
 Public Void SaveCase(){
  insert Cs;
  Atchmnt.ParentId=Cs.Id;
  Insert Atchmnt ;
   
  }
  
  public PageReference UploadFile()
    {
        PageReference pr;
        if(fileBody != null && fileName != null)
        {
          Attachment myAttachment  = new Attachment();
          myAttachment.Body = fileBody;
          myAttachment.Name = fileName;
          myAttachment.ParentId = recId;
          insert myAttachment;
           pr = new PageReference('/' + myAttachment.Id);
           pr.setRedirect(true);
           return pr;
        }
        return null;
    }      
}


 
HI All,

I have 2 custom picklist fields, Eg : abc__c(New, Open, Inprogress) and xyz__c(High, Medium, Low, Average)
If the value of picklist abc__c is 'New' , xyz__c should not be 'Required' and for all rest of values on abc__c , xyz__c should be Required 

Need an validation rule for this.. 

Thanks!!
I have tried in different new orgs but it looks like there is bug in this. Anyone passed this challenge?

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: LBUPDEMW

So everyone else seems to be having an issue with completing the report itself but my problem is adding the report to my dashboard. I keep getting this message
User-added image
I've had the report saved in "Unfiled Public Reports" and "Private Reports" with zero change in the error message. And I have internet... Any ideas as to what's wrong??

Thank,
Courtney

How can I map the Standard Descrition field in my Lead to my Contact Standard Descripton field? Or do I create a New Custom Descrition field on Contact record? Either way I cant figure out how to not lose the data when converting. I think I actually lost my data:(
I'm having trouble installing this app. It gives a compatibility warning. I've searched for a version specifically for Developer's Edition and none were listed. I went to install it anyway, got to the permissions page and the continue button does not work. Ideas?