Home Self-Service Portal - Community

Create a custom textfield validation with code behind

Hello community!

We are looking for a solution for following problem:

We use SCSM and Orchestrator to create a service request offering for creating new AD users, nothing special.

While filling out the form, the creator got the possibility to enter a desired email address for the new user which will be used to create the connecting mailbox for the new user in exchange.

What I'm looking for is to have the possibility to have some sort of advanced text field validation in the service request form like you could do it with regex, but this time with a .net function behind it. I have a function which checks the AD if the emailaddress is already taken and returns "true" oder "false". I want to run this validation when the service request creator leaves the emailaddress field and before he clicks "save".

Currently we resolving this issue by checking the emailadddress in orchestrator and updating the corressponding field in the ticket, but thats not a very elagent way, is it? :-)


Any advice where i could implement that functionality? I was thinking about adding custom javascript on the "leave" event on a particular textfield and than run PageMethogs to get the desired value, but I'm stuck on where to put that?


Thank you and best regards

Chris

Answers

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    Hi Chris, I definitely like this custom validation idea! I think you're on the right track with subscribing to the "leave" event in js and targeting your custom code. Running .Net code would be tricky though unless you wrapped it in some kind of web api on another server (or even another site on the portal server). Maybe you could use this to define a powershell function that mimics or even makes use of your .Net code and wrap it in a web api.

Sign In or Register to comment.