Announcement

Collapse
No announcement yet.

Record update after HTTP Request

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Record update after HTTP Request

    Hello,

    I have been trying for a few days to update a field of a Lead entity.

    My flow is the following, from the entity Mail (when creating) I trigger a flowchart that will create a Lead. I then send an HTTP request to a third party service and get the value returned by this service.
    Then I try to update the 'language' field (custom text field) of the newly created Lead entity.
    I have tried several ways to assign this value to the language field but the change is never taken into account.

    Could you help me with this? Thanks

    Here is the code is used in Formula after the Http request, to retrieve the value fetched from third party service, and to assign this value to my custom field.


    $detectedLanguage = json\retrieve($_lastHttpResponseBody, "translations.0.detected_source_language");

    language = string\lowerCase($detectedLanguage); // First way to update - Doesnt working

    record\update('Lead', parentId, 'language', string\lowerCase($detectedLanguage)); // // Second way to update - Doesnt working

    record\update('Lead', id, 'language', string\lowerCase($detectedLanguage)); // Third way to update - Doesnt working

  • #2
    If you are receiving the language from a third party service you should make sure that the language list is identical. i had similar use case before and solved it with this solution. both fields are identical (i used enum on crm). hope this helps

    Comment

    Working...
    X