User Tools

Site Tools


snc_dynamic_after_share_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
snc_dynamic_after_share_script [2017/07/20 10:55]
javier.valerio
snc_dynamic_after_share_script [2017/11/21 17:58] (current)
paul
Line 6: Line 6:
 The "After share script"​ section allow you to specify a script that will run after the dynamic share has shared a record. ​ This can be useful for when you run scripts in the [[before_share_script|Before share script]] section that you want to then cancel out after the dynamic share has run. The "After share script"​ section allow you to specify a script that will run after the dynamic share has shared a record. ​ This can be useful for when you run scripts in the [[before_share_script|Before share script]] section that you want to then cancel out after the dynamic share has run.
  
-This section expect [[http://​wiki.servicenow.com/​index.php?​title=Scripting_in_Business_Rules|server side javascript]], and is preconfigured with a globally available variable called //current// that is the [[http://​wiki.servicenow.com/?​title=GlideRecord|GlideRecord]] object corresponding to the table record that was just shared out+This section expect [[http://​wiki.servicenow.com/​index.php?​title=Scripting_in_Business_Rules|server side javascript]].  Within your script you have access to the following variables:​ 
 + 
 +current ​ | This represents the record ​that is being shared out  | 
 +| dynamicshare_gr ​  | <wrap info>[[updateset_releases|B Release]]</​wrap>​ An object corresponding to the dynamic share configuration itself (i.e. you can use dynamicshare_gr.table_name to access the "table" field of the dynamic share) ​  |
  
 One example use case is to use the Before and After share script sections together to specify a [[http://​wiki.servicenow.com/​index.php?​title=Language_Internationalization#​gsc.tab=0|language]] to share out records in.  In the Before share script section you would have the following script so all records shared out will have English translated text (for fields that support translation as mentioned in the language link above): One example use case is to use the Before and After share script sections together to specify a [[http://​wiki.servicenow.com/​index.php?​title=Language_Internationalization#​gsc.tab=0|language]] to share out records in.  In the Before share script section you would have the following script so all records shared out will have English translated text (for fields that support translation as mentioned in the language link above):
snc_dynamic_after_share_script.txt · Last modified: 2017/11/21 17:58 by paul