Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This business rule will run when Rich description is empty and description is not empty then it will trigger and sync with description

Real Time scenario
-This will help to copy the content from description
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(function executeRule(current, previous /*null when async*/) {
var description = current.getValue("description");
if (description.indexOf("\t") >= 0) {
description = description.replace(/\t/g, '  ');
}

var lines = description.split("\n");

var rich_description = lines.map(function(line) {
return '<p>' + line + '</p>';
}).join("");

current.rich_description = rich_description;
})(current, previous);
Loading