• Tony Tuan
  • 0 Points
  • Member since 2012
  • Salesforce Technical Lead
  • Sqware Peg

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2

It appears that if you have a master detail, the currency of the detail objects is NOT determined by the parent... Anyone has an easy solution for it? It seems strange to me that this wasn't standard behaviour.

Am getting the following error in POST http method.


Error: CSRF token validation failed and System.HttpResponse[Status=Forbidden, StatusCode=403]"|0x43de18c1


I have two http request, 1. GET and 2. POST. Please review my code below and let me know where am missing.



    Http h = new Http();
    // Instantiate a new HTTP request, specify the method (GET) as well as the endpoint
    HttpRequest req = new HttpRequest();
    req.setHeader('Content-Type', 'application/atom+xml');    
    req.setHeader('x-csrf-token', 'fetch');
    req.setHeader('Authorization', 'BASIC ' + EncodingUtil.base64Encode(Blob.valueOf('username:pasword')));
    HttpResponse res = h.send(req);

POST: Using the above response and passing the CSRF token to my POST method,

        req.setHeader('Content-Type', 'application/atom+xml');
        req.setHeader('Authorization', 'BASIC ' + EncodingUtil.base64Encode(Blob.valueOf('username:pasword')));
        req.setBody('xml hard coded');
        HttpResponse ires = h.send(req);

  • November 27, 2012
  • Like
  • 0

Hi All,


What is the best way to deploy profiles from a sandbox to production, when the profiles in production changed since the last refresh & profiles in sandbox gained additional settings since the refresh?

How to 'add up' to prod without overwriting the existing settings?


Thanks in Advance