HTTP Callout Patch Method in Flow #inSalesforce
To partially update data
Create a screen flow
Append the following to the mentioned flow: https://thesalesforcetutorial.blogspot.com/2023/10/blog-post_16.html
Add screen:
drag drop display text - PutResponse - Display the output as HttpPut Action Element.Name
Add checkbox - UpdateTheName
Text - Enter the new Name, Visibility - UpdateTheName equals True
Save the screen (Put Method Output)
Decision:
Check if UpdateTheName Checked
Yes: UpdateTheName equals True
No : End
Yes:
Action: CreateHttpCallout
Name:PatchService
Named Cred: The same one you created
Next
Label: Patch Invocable Action
Method: PATCH
URL: /objects/{postId}
datatype: String, Give the sample request response review | done
Action Details:
Patch Action Element
Value: Http Post Action Element.Id
Body Value: Create a Apex defined variable - PatchRequestBody
Assignment:
PatchRequestBody.Name equals Enter the new Name
Screen Element:
Display Test - Updated Name: Patch Action Element.Name
Save and Debug
Comments
Post a Comment