Difference between revisions of "ReplaceTemplateVariables"
From AgileApps Support Wiki
imported>Aeric m (Text replace - 'replaceTemplateVariables(' to 'Functions.replaceTemplateVariables(') |
imported>Aeric |
||
(2 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
:;recordID:The identifier of the record | :;recordID:The identifier of the record | ||
;Example: | ;Example:An action that executes Java code could contain the following lines to replace the <tt>$project.name</tt> [[Template Variable]] with a new [[Object Type Identifier]] (<tt>objectId</tt>) and [[Record Id]] (<tt>recordId</tt>). | ||
:{| border="0" cellpadding="5" cellspacing="0" | :{| border="0" cellpadding="5" cellspacing="0" |
Latest revision as of 02:21, 12 January 2013
- Functions.replaceTemplateVariables(String text, String objectId, String recordId)
- Finds and replaces Template Variables with new information
Syntax
Result result = Functions.replaceTemplateVariables(String text, String objectId, String recordId)
Parameters
- text
- Text string
- objectID
- The identifier of the object
- recordID
- The identifier of the record
- Example
- An action that executes Java code could contain the following lines to replace the $project.name Template Variable with a new Object Type Identifier (objectId) and Record Id (recordId).
String text = "$project.name" String replaced_text = Functions.replaceTemplateVariables(text, "PROJECT", "123456")