Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Solved:Workflow error: character limit in text field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am running into an issue with a workflow inserting data from other fields.  On the Task Entity the Subject field has a limit of 450 characters and cannot be adjusted any higher due to the type of text field it is.  When I run a workflow to create a task and insert data from a few other fields in the Subject I receive this error: You have exceeded the maximum number of {0} characters in this field.  So I decided to check the character count of the field if it was to put the requested data in the field and it is only 144 characters.  Then, I took it a step further and manually typed the info in the Subject on Task create step and it works with no issue.  So my question is, why is it treating this as more than 450 characters when using the workflow to dynamically insert the data?  Does the workflow insert extra characters when doing this and if so how many per lookup because it must be adding at least 300+ characters for it to cause this error?

Here is the Subject text and the Workflow syntax to insert the data:

Workflow TEST ACCOUNT has ordered the Social Media Marketing - Essential Package on Facebook/Instragram/Twitter/Pinterest/LinkedIn for 12 Months

I know there is a workaround by creating a new field, change the type to text area and copy the data to new field with a workflow but, I have over a half a million tasks in the system and over 250 workflows that depend on the field.  Not something I plan on doing any time soon.  Any suggestions would be greatly appreciated on how to get around this without having to manually set up for each combination of selected networks.

A little more info on the logic used.

there are 5 networks to choose from

each network field is setup as two options(yes/no) with "no" set as default

the form displays the fields as checkbox

workflow checks each network if "yes" appends network name in field "Selected SM Posting Networks"

*This post is locked for comments

  • Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Solved:Workflow error: character limit in text field

    Hi,

    one possibility would be, the field that you are using already contain value, while you are using append to,  it append the old value and the new value together.

    7840.35.PNG

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow error: character limit in text field

    [quote user="Alex Fun Wei Jie"]

    Hi,

    What i meant is, without the update step. Directly throw the error using stop workflow.

    2308.32.PNG

    or you prefer to update into one of the multi line of text and see the result.

    [/quote]

    I figured out what the issue was.  When I set the first value of the selected networks in the field "Selected SM Posting Networks" it was set as "Append to" instead of "Set to" so that was causing the error.  I changed it to "Set to" and the workflow completes without error.  It still does not explain why it is adding that many extra characters but, I am able to run without issue now so will leave it as is.  Thank you for your help.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Workflow error: character limit in text field

    Hi,

    What i meant is, without the update step. Directly throw the error using stop workflow.

    2308.32.PNG

    or you prefer to update into one of the multi line of text and see the result.

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,052 on at
    RE: Workflow error: character limit in text field

    Hi

    Your Account Name expression does not seem right to me unless you are using some steps that could have this expression.

    {Account{Account Name{Account}}} - Red is the lookup or related account or Account - Then from that, you are Getting Account Name - that's fine. How come you are having Account again from Account Name. 

    You may want to just do this {Account Name{Account}}?

    Hope this helps

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow error: character limit in text field

    [quote user="Charles Abi Khirs"]

    Hello,

    Is there any plugin that is running upon task creation/update and increments the text in the subject field?

    Hope this help!

    Charles Abi Khirs.

    [/quote]

    No plugins updating that field.

  • Suggested answer
    Charles Abi Khirs Profile Picture
    Charles Abi Khirs 3,569 on at
    RE: Workflow error: character limit in text field

    Hello,

    Is there any plugin that is running upon task creation/update and increments the text in the subject field?

    Hope this help!

    Charles Abi Khirs.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow error: character limit in text field

    [quote user="Goutam Das"]

    Hi,

    Does it happening for particular record or all record ?

    Are you sure that the same field is creating problem . It might happen some other field exceeding limits .

    In  addition please  check you you have set the field length correctly .

    [/quote]

    All records that I run the workflow against.  The error specifically says it is the subject field

    A validation error occurred.  The length of the 'subject' attribute of the 'task' entity exceeded the maximum allowed length of '450'.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow error: character limit in text field

    I am assuming you meant to add the Stop Workflow step and set it to Cancelled, directly after the task create step.  I did that and get the same result, had to create a new workflow because there were steps after and it would not let me save the workflow.  The status of the workflow is waiting and the same error.

    A validation error occurred.  The length of the 'subject' attribute of the 'task' entity exceeded the maximum allowed length of '450'.

  • Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Workflow error: character limit in text field

    Hi,

    can you use stop workflow with cancelled status, and putting the same dynamics value into the worfklow error message?

    Lets see the final result.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow error: character limit in text field

    was doing that when you posted, images are added.  thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans