• Fenil Mehta 13
  • 0 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 6
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 .



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": 
$Profile.Name <> 'System Administrator', 
$Profile.Name <> 'Custom: Sales Profile' 


High Value Opportunity Validation:

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

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}" />

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

	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()));

public class accountsWithContactsClass {

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>();
    for (Contact con:trigger.new)
      for(contact con:conlist)
  update conlist1;