Hi All,
Can anyone give me an example of C# or vbscript script that prevents a document from entering a workflow stage?
So under entry conditions on the stage I have a rule script and I'm using a predefined registration parameter to determine whether the document should enter the stage or not.
So far I have:
So just need to put something into labelled section to prevent access to stage based on the fact varSupplierID is not empty. Can't see any relevant sample scripts and finding the documentation hard to interpret in this case.
Thanks
Rich
Can anyone give me an example of C# or vbscript script that prevents a document from entering a workflow stage?
So under entry conditions on the stage I have a rule script and I'm using a predefined registration parameter to determine whether the document should enter the stage or not.
So far I have:
string varSupplierID = Document.Properties.Get("fc_Predefined:InvoicePredefinedVendorId");
if (varSupplierID != "")
{
//If not blank I need to skip stage
}
So just need to put something into labelled section to prevent access to stage based on the fact varSupplierID is not empty. Can't see any relevant sample scripts and finding the documentation hard to interpret in this case.
Thanks
Rich
Comments
2 comments
I think you should use following statement:
Result.CheckSucceeded = false;
So, your code will be:
string varSupplierID = Document.Properties.Get("fc_Predefined:InvoicePred efinedVendorId");
if (varSupplierID != "")
{
//If not blank I need to skip stage
Result.CheckSucceeded = false;
}
- Rahul
I'll give it a try, thanks for your help!
Cheers
Rich
Please sign in to leave a comment.