Globally shared functons - Forum - Rollbase - Progress Community

Globally shared functons


Globally shared functons

  • If I have a server side function that I use frequently, is there somewhere i can put it to make it globally available? If not, do I put it in a template field for each object? thank you.
  • I would recommend to place all your common JavaScript functions into Hosted File, than include that file into all pages like this script:

  • sorry, I can't see your script...was it an image attachment?
  • Sorry Pavel, I must be doing something wrong. I get errors when I do this:
  • My example was intended for client-side use. I can try to provide similar functionality on server side as well, but it's not available at a moment.
  • that would be great. I have a HEAP of code that i'm duplicating in many formula fields. thanks Pavel.
  • You can use Template fields for this, and then just include them as merge fields in your formulas, or wherever you need to insert the JS code.
  • Hi Matt, I tried this, but get errors:

    ERROR: Error illegal character (line #1) in formula: function utBoxAddress(phoneNumber, type)\n{\n if(phoneNumber.length

    My template (functions_for_contac) has just the 2 functions, and i include it on line 1 like this:

    Am I doing something wrong?
  • Matt, can you submit a support ticket on this with Object name and Formula field name shown above? I want to track it in our system so you get a response and have the info to take a look