hope someone can help me understand what am I missing here.
I have a pretty simple requierement. We have a flow that, among other things, creates a record for a custom object type ("Provider Order") with a Name that concatenates AccountName and today's date. So the formula previously was
{!AccountLookup.recordName} + TODAY()
However we started having issue with Account names that were too long, on which trying to create a Custom Order with the Account Name + today's date resulted in more than 80 chatracters. So I just modified it like this:
LEFT({!AccountLookup.recordName}) + TODAY()
After the modification I expected it would shorten the names correctly, but for some reason looks like Flows was just ignoring the LEFT()
in my formula and leaving the Account name and the date.
I then tried creating a resource of type Formula, using the following formula in it:
LEFT({!AccountLookup.recordName}, 65) + TEXT(TODAY())
And, for testing purposes added a screen element that would display it before creating the object. The flow eneded up looking something like this:
Nodes
Formula creation
Forumla usage in Screen element
Formula usage in Create Provider Order node
What I cannot understand is why in the first step (the screeen) it displays as expected, but in the second step (the object creation) it's still failing.
The original account name is
over 69lcmlsdmclskmcskmclksmdclksmdlskmlcksmdckmclskmdclksdmclksmdlcksmdclmklmclksdmclksdmc
The name displayed in the screen element is the following (note it's correctly cropped):
over 69lcmlsdmclskmcskmclksmdclksmdlskmlcksmdckmclskmdclksdmclksm2023-01-05
And finally the name shown in the Error log is this (note the date is correctly added but it's not cropped at all)
over 69lcmlsdmclskmcskmclksmdclksmdlskmlcksmdckmclskmdclksdmclksmdlcksmdclmklmclksdmclksdmc 2023-01-05
Hope someone can give me direction on what I'm doing wrong and how can I achieve this functionality.
Thank you!
LEFT({!AccountLookup.recordName}, 65) + " " +TEXT(TODAY())