It's all about the answers!

Ask a question

How to get the Query results using server side Api in validation plugin?

lakshmi jyothsna (379) | asked May 22 '20, 7:31 a.m.

 Hi All,

Is there any possibility to get the Query results of a personal query in the server side validation plugin ? If so please let me know what is the API to achieve this? 

For better understanding here i am explaining the scenario of this:

We have a custom attribute "EMR NO" in our Task Work Item. Lets say i entered "1" in that . When I am trying to create another "Task" work item it should get automatically pop up with "2" in the "EMR NO" . ie it should auto incremented to the earlier Tasks EMR NO. How can we achieve this ? Kindly help .
Note: we have a personal query in our environment to get the EMR No of the TASKS.

Waiting for your Reply,


Accepted answer

permanent link
Ralph Schoon (62.3k33643) | answered May 22 '20, 11:32 a.m.
I would suggest to come up with a different approach to create/store and retrieve the unique number.
Running a query for all work items of a type would be the most terrible approach I could think of. Maybe contains an idea, not sure.

I am at a loss why this question has anything to do with a validation plugin.
lakshmi jyothsna selected this answer as the correct answer

lakshmi jyothsna commented May 23 '20, 5:38 a.m. | edited May 25 '20, 2:57 a.m.
Hi Ralph,

Thanks for the reply. Please let me know is there any way to trigger a plugin when work item is loading or creating ? kindly let me know is there any possibility of getting the auto generated value? Thanks again


Ralph Schoon commented May 25 '20, 2:59 a.m. | edited May 25 '20, 3:00 a.m.

As the link I already sent you above suggests, you want to write a follow up action for WorkItem save. See and Especially look at the RTC Extensions Workshop that is referenced.

lakshmi jyothsna commented May 26 '20, 11:41 p.m.
Hi Ralph,

Thanks alot . Its worked for me.

Your answer

Register or to post your answer.