Wiki source code of Utils
Hide last authors
3.1 | 1 | Some utility functions, especially for emails notifications | |
1.1 | 2 | ||
3 | |||
4 | |||
3.1 | 5 | == Functions == | |
1.1 | 6 | === SUImpersonate() === | |
3.1 | 7 | Impersonate the execution thread as a super user (Admin with all privileges) | |
1.1 | 8 | ||
9 | === GetLink(obj, actionName, params) === | ||
10 | |||
3.1 | 11 | * obj. The target entity | |
12 | * actionName. The action to be used. optional. Default value is "get" | ||
13 | * params. Optional parameters | ||
1.1 | 14 | ||
3.1 | 15 | return: A direct link on the target object. (URL link). The object may be any entity. | |
16 | example: | ||
17 | {{code language="javascript"}} | ||
18 | ${Utils.GetLink(assignment, "approve")} | ||
19 | {{/code}} | ||
1.1 | 20 | ||
3.1 | 21 | return: The URL as a string | |
1.1 | 22 | === ExtractTextFromHTML(txt) === | |
3.1 | 23 | Extract the text component for an HTML content | |
1.1 | 24 | ||
3.1 | 25 | return: the text part | |
1.1 | 26 | === GetPropertyTitle(appname, propname) === | |
27 | |||
28 | |||
3.1 | 29 | return: The property title of a property of an entity | |
30 | example: | ||
31 | {{code language="javascript"}} | ||
32 | ${Utils.getPropertyTitle("rqTimeOffRequest", "rqBeneficiary")} | ||
33 | {{/code}} |