Has anyone had any success in setting the Organizations field on an open form using an Initialiser or Behaviour in ScriptRunner? Ideally I'd like to be able to automatically set the initial form value of the Organization that appears on the "Share with..." field in a customer Request Type, but I can't even get Scriptrunner to set the Organizations field on a form with a initialiser or behaviour.
Again, this is just about setting what value appears on the form, before it's been submitted; no issues validating or changing the Organizations field once the ticket has been submitted.
I had a similar requirement but I was never able to interact with the "Share with" options in the portal.
I ended up using a script listener. I don't remember why I chose that over a postFunction.
Unfortunately, that doesn't help with setting a default option that the user would then be able to override with their own selection, if desired.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are correct.
In my case, I never have a reason to allow customers to leave their tickets private.
If the customer selects an organization to share to, I leave that selection it (useful if they have access to more than one). If they leave it blank (private) I add the default one.
You would need to create additional custom fields to let the customer choose what they want and use those selections in the script.
Scriptrunner Behaviour is simply just not designed to interact with the "Share With.." control on the portal form since it's not a standard field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't seem like it's designed to interact with the Organizations field in general - I can't set that field using a behavior in the regular portal either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.