• Fenil Mehta 13
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hi All,

I want to  retrieve more than 2000 records in single response ,as I am using rest Api .
Any solutions ?

/services/data/v46.0/query/?q=Select Id,XXX__c,CompletedDateTime,XXX__c,WhoId  from task WHERE CreatedDate > 2019-10-30T08:03:30.729Z and CreatedDate < 2019-10-30T18:33:30.729Z .

Thanks
 

Hi,

I have followed several different solutions to this step, but still, I am recieving this error: 

"Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, error: [Name]"

Has anyone got any ideas on how to solve this? 

Please let me know what you need of information from this. I have the following validation rules on opportunity object :
"Approved field validation": 
AND( 
ISCHANGED(Approved__c), 
OR( 
$Profile.Name <> 'System Administrator', 
$Profile.Name <> 'Custom: Sales Profile' 

)

High Value Opportunity Validation:

AND( 
IsClosed = TRUE, 
Amount > 100000, 
Approved__c <> TRUE 
)

I don't know why, but Trailhead does not see that I've setup a user Samantha Cordero with the profile Field Sales User. I've create the Field Sales User profile, created the user Samantha Cordero, activate the user, generate a password, and logged in as the user. I even logged in as her in Salesforce 1, but I still get this message:
error message
Here is what her user detail page:
User-added image
Field Sales User profile:
User-added image
Hi, 

I want to display list of accounts with contacts in lightning page. Here the code i have written. Here accounts are displaying but contacts are not display. Please help me to display the accounts with contacts.

Thank you.


 
<aura:component controller="accountsWithContactsClass" implements="flexipage:availableForAllPageTypes" access="global">
	 
    <aura:attribute name="accounts" type="Account[]" />
    <ui:button label="click this" press="{!c.myAction}" />
    <table>
            <tr><td><b>Name</b></td><td><b>Industry</b></td></tr>

    <aura:iteration items="{!v.accounts}" var="accs1" >
        <tr>   
        <td> {!accs1.Name}  </td>
         
      <td>   {!accs1.Industry}  </td> 
      <!--   <td>   {!accs1.Contacts.lastName}  </td> -->
        </tr>     
     <tr>   <aura:iteration items="{!v.accs1.contacts}" var="con1" >
            
             <td>{!con1.lastName} </td>
            
        </aura:iteration></tr>
     </aura:iteration>                                            
        </table>
    
</aura:component>








({
	myAction : function(component, event, helper) {
		var action =component.get("c.getAllAccounts");
        console.log('The action value is: '+action);
         action.setCallback(this, function(a){ 
             
            component.set("v.accounts", a.getReturnValue());
           //  console.log('The accs are :'+JSON.stringify(a.getReturnValue()));
            console.log('The accs are :'+JSON.stringify(a.getReturnValue()));
          
        });
        $A.enqueueAction(action);
	}
})











public class accountsWithContactsClass {

@auraEnabled
public static list<account> getAllAccounts()
    {
       list<account> accs =[select id,name,phone,industry,(select lastName from contacts) from account limit 10];
      //  list<account> accs =[select id,name,phone,industry from account limit 10];
     //   return [select Id,Name from account limit 10];
     return accs;
    }
}

 
trigger realtime2 on Contact (before insert)
  {

     map<id,string> map1=new map<id,string>();
     list<contact> conlist=new list<contact>();
      list<contact> conlist1=new list<contact>();
if(trigger.isbefore)
    {
    for (Contact con:trigger.new)
     {
       map1.put(con.id,con.phone);
       conlist.add(con);
     }
      for(contact con:conlist)
      {        
       con.mobilephone=map1.get(con.id);
       conlist1.add(con);
     }
    
  update conlist1;
   }
  }