Service Portal: pass a url parameter to a widget on a page

example HTML:

<div> <a href="{{data.profile_url}}" class="h4 text-primary m-b-sm block"> <span class="ng-binding">Edit Profile</span>&nbsp; <i class="fa fa-edit"></i> </a> </div>


var sURL='<portal>?id=<portal_page>&sys_id='+data.sysUserID+'&sysparm_aparameter=true'; data.profile_url = sURL;


example server script to catch the parameter: 

//var sURL_editparam = gs.action.getGlideURI().getMap().get('sysparm_aparameter');//--would work, but below is neater var sURL_editparam=$sp.getParameter("sysparm_aparameter"); if (sURL_editparam == 'true') { gs.addInfoMessage('parameter passed); }


Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

Running transform maps asynchronously