var getNSSRFlowContext = Class.create();
getNSSRFlowContext.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getFlowContext: function(){
var id = this.getParameter('sysparm_id');
var ctx = new GlideRecord("sys_flow_context");
ctx.addEncodedQuery("source_table=x_hclda_nssr_request^source_record="+id);
ctx.query();
if(ctx.next()){
var results = {
"success":"true",
"id":ctx.getUniqueValue()
};
return JSON.stringify(results);
}
gs.addErrorMessage("Flow Context does not exist for this record.");
var result = {
"success":"false"
};
return JSON.stringify(result);
},
type: 'getNSSRFlowContext'
});
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter