Hi Dmitry
What I’ve try but is not optimal and didn’t fulfill my requiring
- add condition on the choice “Send To Representative”
The condition is
(!string.IsNullOrEmpty(Document.RepresentativeType))
&& (Document.RepresentativeType.NotEquals("-1"))
This hide the choice from the menu, until representative is selected but I need it to be disabled not hided
2.Try to use the Workflow Event Approve.Before
if (e.PreviousStep.StepName == "Representative")
{
e.Cancel();
throw new ApplicationException("select representative frist");
}
This fire exception after the action is clicked, and a message informs that workflow is moved to representative step, with general error message “to see the log details”,
I’ve to refresh the page to see it’s still on the same editor process and workflow not moved
How to solve this issue,
I need a way to either disable the button not hide it
Alternatively, display a custom message if the representative not selected