Workflow - Use of Description Field creates issues with workflow

Reported this issue: http://suitecrm.com/forum/suitecrm-7-0-discussion/846-help-aow-workflow-action-steps-disappear-from-workflow-setup

Through some troubleshooting, i’ve found this situation occurs when large amounts of text are placed in a description field value within the workflow.

For instance: Choosing to create a task (or record) and adding the description field with the following example value:

INSTRUCTIONS:

  1. Verify information contained in this request
  2. Click ‘Edit’
  3. Select the Outgoing Management Company, or
    choose “Self-Managed”
  4. Verify the Board Contact is the person we will
    correspond with during onboarding.
    (If not, add a new board member by clicking the
    “Arrow” and then selecting
    ‘Create new BOD Contact’ or select an existing one)
  5. Check the “Request Approved” Box
  6. Click ‘Save’

I would assume it has something to do with the carriage returns, commas, or " or ’ punctuation contained within the input value.

Hi dgreene,

Can you create an example workflow, of a standard module, where you would have several fields in the action and then a large description so that I can replicate the workflow? I have tried this with a simple workflow using cases/tasks and it seems to save the description correctly when creating the new record.

Note: I will try this on an instance running on Windows and post back results.

Thanks,

Will.

The example is in my original post - but here’s a PDF of the layout I created that experiences the issue. I’ve further determined that its the carriage return in the text area field “description” that is creating an issue. I assume because of the way you’re encoding the string in the database, the encoding can’t handle the carriage return. Works fine when i omit any returns from the entered text.

Hi dgreene,

I need an example with a standard module. I can’t replicate an issue with a custom module I don’t have. This may be to do with MSSQL as it works as required on a linux install with MySQL. I will test in a Windows environment and post the results.

Thanks,

Will.

Will,

Its as simple as creating a workflow on any module with a description field, skip the conditions, add the description field in the actions with the text from my example and click save. Then go back and edit the workflow - the action step is now blank. You don’t even need to run the workflow or make it active.

See screen shots. This is taken from the 7.1 upgrade in my test environment, but the same happens on 7.02

(FYI the example is on the “Accounts” module - we’ve just renamed it)

Hi Will and dgreene,

I dug a little deeper and found that this is not due to large amounts of data in a description field, just data with carriage returns in it.

onetwo

will save ok and display.

one
two

will appear to save ok in the database but does not display.

My test was performed on my laptop. Windows 7, XAMPP 1.8.3 (MySQL 5.6.14, PHP 5.5.6, Apache 2.4.x)

Clearly it is not an issue with the MS Sql interface because I am using MySQL. Instead, I strongly suspect that it is a bug in the code that is parsing the parameters field from aow_actions.

Cheers

Bruce

1 Like

Hi Will and dgreene,

I have made the change shown below to the following two files
\SuiteCRM7.0.2\modules\AOW_Actions\actions\actionCreateRecord.php
\SuiteCRM7.0.2\modules\AOW_Actions\actions\actionModifyRecord.php


    //$html .= "load_crline('".$line."','".$field."','".$params['value'][$key]."','".$params['value_type'][$key]."');";
    $html .= "load_crline('".$line."','".$field."','".urlencode($params['value'][$key])."','".$params['value_type'][$key]."');";

It allows the creation of values that contain carriage returns and they display again correctly when you come to edit them.

I have not yet tested if the workflow will run correctly but this is a good start.

Cheers

Bruce

1 Like