Textarea formatting using Action framework

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
When using the action framework to move the contents of one textarea field to another in a different model, the original formatting is lost, specifically the CR's are turned into spaces {{$Model.NewEvaluation.data.0.Notes__c}} is being copied into the'Actvities' object Description field.
Photo of Paul Heald

Paul Heald

  • 420 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
That's no bueno.

Could you share the specific set up you're referring to?
Photo of Paul Heald

Paul Heald

  • 420 Points 250 badge 2x thumb
the use case is that we create a record in a custom object table 'Evaluation' after creation we use the action framework to create a task for another member of staff. As part of the task created we copy the notes field (textarea) from the 'Evaluation' object created to the Description field of the newly created task.
This process strips out the carriage returns from the original field replacing them with spaces.
Original value:
Process evaluation:
phase 1 complete
phase 2 ongoing

Value placed in Description field of the task:
Process evaluation: phase 1 complete phase 2 ongoing

It is possible to open the task and modify the data to its original format but this is not practicable.
(Edited)
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
I created a test page where I was able to recreate the issue under certain circumstances.
This is a time where 3 {{{}}} would be needed instead of 2 {{}}. Does that solve your issue?
Only having 2 {{}} brings over the HTML and that forces the formatting to be lost.
Photo of Paul Heald

Paul Heald

  • 420 Points 250 badge 2x thumb
Great, this has solved the problem