• Niks Developer
  • NEWBIE
  • 5 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi - I have created a flow which is meant to loop through all child records and update a couple of fields. The flow is getting the records correctly, assigning the new field values but on the last record that is updated it isnt adding it to the collection to be updated. Super weird and Ive pasted some of the code below as well as relevant screenshots.
From what I can see in this example:
1. All 5 child records are obtained without a problem
2. The loop goes through each of the records
3. The final record gets new values assigned but it doesnt get included on the update records which happens after the last record (in this case this is the record ending with XUAQ)

any help greatly appreciated

Final part of the flow and the record in question
User-added image
User-added image

2nd image shows only 4 records getting updated
User-added image
 
I am using Named Credential as an Identity Type and Password Authentication as an Authentication Protocol 
I have checked all three check boxes:
Generate Authorization Header.
Allow Merge Fields in HTTP Header.
Allow Merge Fields in HTTP Body.
While I am trying to execute below code,facing issues:

HttpRequest req = new HttpRequest(); req.setEndpoint('callout:HTTP_Basic_Credential/services/data/v32.0');
req.setMethod('GET');
//sending request

HTTP_Basic_Credential is a name of mine Named Credential.

While  I am setting Generate Authorization Header flag , I am receving below error:

[{"message":"INVALID_HEADER_TYPE","errorCode":"INVALID_AUTH_HEADER"}]

If flag is not set then getting :Session is expired.