Difference between revisions of "SsEncrypt"
From SmartWiki
Lorena Ruiz (talk | contribs) m |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
===[[Level 2 Types|Level 2 template]] page token=== | ===[[Level 2 Types|Level 2 template]] page token=== | ||
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ssEncrypt>typeid,appid,rootcompanyid</ssEncrypt></pre> | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ssEncrypt>typeid,appid,rootcompanyid</ssEncrypt></pre> | ||
+ | When encrypting parameters in an internet enabled level 2 template (in the url /ex/ex_Evtpage.jsp) it is recommended ssEncrypt2 be used. | ||
+ | * Instead of using 'eventid' as a parameter, use 'codedid' | ||
+ | * Instead of using 'parentids' as a parameter, use 'enparentids' | ||
+ | '''Unencrypted:''' | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"> | ||
+ | https://alias.smartsimple.com/ex/ex_Evtpage.jsp?token=Gw4NRhwGZVhdQhNRXxdTQlRVbFI%3D&parentids=@parent.opportunityid@&eventid=@eventid@ | ||
+ | </pre> | ||
+ | '''Encrypted:''' | ||
+ | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"> | ||
+ | https://alias.smartsimple.com/ex/ex_Evtpage.jsp?token=Gw4NRhwGZVhdQhNRXxdTQlRVbFI%3D&enparentids=<ssEncrypt2>@opportunityid@</ssEncrypt2>&codedid=<ssEncrypt2>@eventid@</ssEncrypt2> | ||
+ | </pre> | ||
==={{WPV}} token=== | ==={{WPV}} token=== | ||
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ssEncrypt2>objectid</ssEncrypt2></pre> | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><ssEncrypt2>objectid</ssEncrypt2></pre> | ||
Line 16: | Line 27: | ||
Example (custom field located on the Level 1 UTA role): | Example (custom field located on the Level 1 UTA role): | ||
<pre> | <pre> | ||
− | <input type=button class="Button" onclick="javascript:openRoleFields('<ssEncrypt2>@oprid@</ssEncrypt2>',@roleid@)" value="My Vote"/><script>function openRoleFields(objectid,roleid){fieldid_window = window.open('/s_editcustomfields.jsp?iswin=1&objecttype=91&opportunityid=@levelone.opportunityid@&itemlist='+roleid+'&objectid='+objectid,'field_window', 'menubar=no,scrollbars=yes,width=850,height=300,status=no,resizable=yes,top=200,left=200,dependent=yes,alwaysRaised=yes');fieldid_window.opener = window;fieldid_window.focus();} </script> | + | <input type=button class="Button" onclick="javascript:openRoleFields('<ssEncrypt2>@oprid@</ssEncrypt2>',@roleid@)" value="My Vote"/> |
+ | <script> | ||
+ | function openRoleFields(objectid,roleid){ | ||
+ | fieldid_window = window.open('/s_editcustomfields.jsp? | ||
+ | iswin=1&objecttype=91&opportunityid=@levelone.opportunityid@&itemlist='+roleid+'&objectid='+objectid,'field_window', | ||
+ | 'menubar=no,scrollbars=yes,width=850,height=300,status=no,resizable=yes,top=200,left=200,dependent=yes,alwaysRaised=yes'); | ||
+ | fieldid_window.opener = window; | ||
+ | fieldid_window.focus(); | ||
+ | } | ||
+ | </script> | ||
</pre> | </pre> | ||
Latest revision as of 14:42, 21 March 2017
ssEncrypt and ssEncrypt2 can be used to dynamically generate an encrypted token when creating URLs to access other entities with SmartSimple.
Tokens are created using two different encryption methods. Accordingly, either ssEncrypt or ssEncrypt2 are used, depending on which entity is involved:
Contents
Level 1 template page token
<ssEncrypt>typeid,rootcompanyid</ssEncrypt>
Level 2 template page token
<ssEncrypt>typeid,appid,rootcompanyid</ssEncrypt>
When encrypting parameters in an internet enabled level 2 template (in the url /ex/ex_Evtpage.jsp) it is recommended ssEncrypt2 be used.
- Instead of using 'eventid' as a parameter, use 'codedid'
- Instead of using 'parentids' as a parameter, use 'enparentids'
Unencrypted:
https://alias.smartsimple.com/ex/ex_Evtpage.jsp?token=Gw4NRhwGZVhdQhNRXxdTQlRVbFI%3D&parentids=@parent.opportunityid@&eventid=@eventid@
Encrypted:
https://alias.smartsimple.com/ex/ex_Evtpage.jsp?token=Gw4NRhwGZVhdQhNRXxdTQlRVbFI%3D&enparentids=<ssEncrypt2>@opportunityid@</ssEncrypt2>&codedid=<ssEncrypt2>@eventid@</ssEncrypt2>
Web Page View token
<ssEncrypt2>objectid</ssEncrypt2>
Example: To open the Web Page View with custom field ID 123456 on a contact you would use the following syntax:
<input type=button class=Button value="Open" onclick="_openpageview('123456','<ssEncrypt2>@userid@</ssEncrypt2>',1)" >Note: if you have URL Parameter Encryption enabled, the custom field ID must be encrypted as well using ssEncrypt3. If custom field 654321 is on a Level 1:
<input type=button class=Button value="Open" onclick="_openpageview('<ssEncrypt3>654321</ssEncrypt3>','<ssEncrypt2>@opportunityid@</ssEncrypt2>',1)" >
Contact Role Intersection (Level 1)
<ssEncrypt2>oprid</ssEncrypt2>
Example (custom field located on the Level 1 UTA role):
<input type=button class="Button" onclick="javascript:openRoleFields('<ssEncrypt2>@oprid@</ssEncrypt2>',@roleid@)" value="My Vote"/> <script> function openRoleFields(objectid,roleid){ fieldid_window = window.open('/s_editcustomfields.jsp? iswin=1&objecttype=91&opportunityid=@levelone.opportunityid@&itemlist='+roleid+'&objectid='+objectid,'field_window', 'menubar=no,scrollbars=yes,width=850,height=300,status=no,resizable=yes,top=200,left=200,dependent=yes,alwaysRaised=yes'); fieldid_window.opener = window; fieldid_window.focus(); } </script>
Transaction token
<ssEncrypt>userid,typeid</ssEncrypt>