Phil - Friday, December 20, 2013 11:37 PM:
So here's my situation in a nutshell:
I have a bunch of lets say Document Items. These document Items have a property called "Project".
When a user double clicks on an Item to open it , if that users list of acceptable projects does not match up with the project value for the Item they just tried to open, I do not want that Form to open at all. I just want to send them a nice little message that says "hey you, you cant look at this".
I have a working process in place now, but it involves using the OnLoad event on the associated Form, and then just calling window.close() if the user doesnt match the criteria. This method works, but the form still opens for a brief second before closing out.
My solution works, but I just think there should be a more professional way. The onBeforeGet server event seems like it would be a good place to start..but that sounds like its really more suited for dealing with searches and results. I really want an event I can utilize to intercept the request of getting an Item before the associated Form is opened.
Thanks for any advice!
BTW - Im on 9.3
vasant - Saturday, December 21, 2013 1:13 AM:
Hi Phil,
Rather than using Client side code, it can be resolved by using Server Side Event "OnBeforeGet".
Write a Server Event on "Document" Item with Event as "OnBeforeGet".
You can build C# condition as:
string acceptableProjectList = "Project A, Project B, Project C";
this.setProperty("project_name",acceptableProjectList);
this.setPropertyAttribute("project_name","condition","in");
return this;
It will only show the documents of Acceptable Projects in TOC View.
Hope it helps..
Thanks - Vasant