What is the syntax for calling private function in business rule

Bharathi Sake
Tera Contributor

Can some one help with my query,

Can we call private function of script include, if yes, what is the syntax for calling.

3 REPLIES 3

Saiganeshraja
Kilo Sage
Kilo Sage

The isPublic() setting takes precedence over the glide.script.ccsi.ispublic property. For example, if the property is set to false, making all client-callable script-includes private, and a script sets isPublic() to true, the script is public.

To change the privacy for a single client-callable script include, add the following method to the script include:

  isPublic:function(){return[true/false];},

Example

Make the NewInclude client script private.
var NewInclude =Class.create();
 
NewInclude.prototype={
   initialize:function(){},
 
   myFunction:function(){//Put function code here},
   isPublic:function(){return false;},
 
   type:'NewInclude'};

For information Refer Here

Mark correct and helpful

can you please Look into it?

https://community.servicenow.com/community?id=community_question&sys_id=089b4be2db8341d00d48db85ca9619a3

answered your question 🙂 .Let me know if it worked for you or not.