• Thomas.Smith
  • NEWBIE
  • 5 Points
  • Member since 2015
  • Software Developer
  • ClaimVantage

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 4
    Replies
I do not see any option on the page, however the challenge section says that 'This unit doesn't have a challenge. You can still earn points by marking the unit as read. Good job!' 
This is for Creating and Customizing Lightning Apps trail.
Hi friends
This is an urgent requirement, kindly help.
I have two different salesforce accounts  and I am trying to delete records based on criteria using rest api annotation @HttpDelete

The code in destination is:
@HTTPDelete 
 webservice static string DeleteAccounts()  
 {
    Account a=[select Id from account where Name LIKE :'%TVS Electronics%'];
    return a.ID;
 }
}
The code in source is:

          Http h = new Http();
         
          HttpRequest req = new HttpRequest();
       
          req.setMethod('DELETE');
       
          req.setHeader('Authorization','Bearer '+Helper.GetAccessToken().access_token);
       
          req.setHeader('Content-Type','application/json; charset=UTF-8');
         
          //call the rest resource URL and this url needs to be registered in remote settings
          req.setEndpoint('https://ap2.salesforce.com/services/apexrest/AccountRest');  
           
          HttpResponse res = h.send(req); // JSON string is generated at this point
 system.debug('---res.getBody()--'+res.getBody());

In res.getBody() , I am getting the ID of the record which was passed from source
Now how do I pass this ID back to source indicating that this record is to be deleted.

I hope I am clear

Thanks
pooja
 
Hi,

I have one object as Policy, in that object having policy number field. 
in that field upper case and lower case letters are there.So here i want to know how many policy numbers having small letters.
Is it possible in salesforce ?
Hi,

I have authorized salesforce with drupal. 

I am using profile2 for extra fields of drupal user. I have lastName mapped to contact Lastname in salesforce mapping. Still when I update a contact I get Required fields are missing: [LastName] error. I can see the contact value is getting updated in salesforce, but this error is not going. 

When I check the drupal logs, I could see the error 
SalesforceException: Required fields are missing: [LastName] in Salesforce->apiCall() 

In the apiCall function of the module, in the params send I could see company__C and lastname empty. But I am not sure why this is happening

And I tried sending a lastname value separtely in the function. At that time what happens is another entry in the contact get inserted..ie for a profile two entries, One with the values that is send via user UI and also with the lastname I put in code.

Any immediate help would be appreciated.
I do not see any option on the page, however the challenge section says that 'This unit doesn't have a challenge. You can still earn points by marking the unit as read. Good job!' 
This is for Creating and Customizing Lightning Apps trail.