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