Client Callable Business Rules

kungfuu72
Giga Expert

I'm looking for more information about what exactly a business rule marked "Client callable" true does differently. I've searched through the Wiki, but did not see any explanation on the capabilities, advantages, or meaning of this check box for business rules (not script includes).

 

For example: You have a regular business rule that contains a function (as it is best practice to enclose your business rules in a unique function), and the associated table is the sc_req_item table:

 

  • What does that Client callable check box allow you to do, or what capability/advantage does it give you? You would think then, that possibly the function enclosed in the business rule could be referenced to the client on that specific table.
  • If this theoretical business rule is checked as Client callable, how would you "call" it from the client?
  • If Client callable is checked, could you reference this business rule in the conditions of other scripts, for example, like UI Action conditions, etc. ?

 

Plenty of what-if's...

1 ACCEPTED SOLUTION

swilson
Tera Expert

Hi, Daniel. I believe that the Client Callable checkbox on business rules was used way back when to allow business rule functions (usually in a global business rule) to be accessed by client side AJAX calls. This has all been deprecated in favor of GlideAjax and script includes (which you also mark client callable). Global business rules, in general, should no longer be used but instead use a script include function. You still have to use an AJAX call in order to access any server side code from your browser.



Since UI Action conditions run server side you can access both global business rule functions and script include functions from there with or without the client callable checkbox on.



Thanks.


- Steve


View solution in original post

2 REPLIES 2

swilson
Tera Expert

Hi, Daniel. I believe that the Client Callable checkbox on business rules was used way back when to allow business rule functions (usually in a global business rule) to be accessed by client side AJAX calls. This has all been deprecated in favor of GlideAjax and script includes (which you also mark client callable). Global business rules, in general, should no longer be used but instead use a script include function. You still have to use an AJAX call in order to access any server side code from your browser.



Since UI Action conditions run server side you can access both global business rule functions and script include functions from there with or without the client callable checkbox on.



Thanks.


- Steve


kungfuu72
Giga Expert

I'll accept that.



Since its deprecated I won't worry about it so much and got the explanation I needed to efficiently continue what I was trying to do. Thanks Steve!