Community

Entry Condition Script

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:


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

Was this article helpful?

0 out of 0 found this helpful

Comments

2 comments

  • Avatar
    Permanently deleted user
    Hi Rich,

    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
    0
  • Avatar
    Permanently deleted user
    Hi Rahul,

    I'll give it a try, thanks for your help!

    Cheers

    Rich
    0

Please sign in to leave a comment.