but I'm guessing you'd be better off doing a scrip...
# suiteflow
k
but I'm guessing you'd be better off doing a script to set a checkbox immediately before submission and then use that checkbox as a method to prevent it from advancing through the workflow
j
I'm thinking about that ... but since this validation is triggered by a button action, it needs to be accessible in both view and edit mode
k
well - a button action should be able to be constrained by a saved search field
Assuming - that is, that you aren't doing the button action from a mass entry page.
j
Nah, I'm doing it from the record itself. But I'm not sure if we can validate across a dozen fields the same way (I'm also trying to avoid using a fieldChanged listener on every one of the fields I'm validating)
I guess let's look at the problem from the top again... I'm trying to implement the following behavior: 1. User clicks workflow button 2. Client Side Script validates record 3. if (2) returns true, advance to next state 4. if (2) returns false, display error message and do not advance
I'm having trouble implementing step 2
k
Couldn't you just insert an extra state for performing that validation?
j
I tried that with little success (mostly because I'm inexperienced with displaying error messages using WF states) but I think that might be the best approach...
k
i.e. State 1 -add button. State 2- Test. State 3a - Result A, State 3b - Result B - return to state 1?
j
I'll give that another shot
thanks Kevin
k
I'd have state 3b check a box
for controlling whether the message showed up
and have that box be a trigger for a message on state 1.
so - slightly different method, but should still "work"