How to Activate the workflow based on sequence number


I have multiple sequence number configured for one workflow in hr workflows, in Form level,i need to activate the workflow based on the sequence number allocated in the setup screen.

if anyone come across these please help me out


Hi JKReddy,

Please write your condition in canSubmitToWorkflow method for validations as below.

public boolean canSubmitToWorkflow(str workflowType = ‘’)


boolean canSubmit = false;

if (this.RecId && this.DocumentState == VersioningDocumentState::Draft)


canSubmit = true;


return canSubmit;


Thanks & Regards,

Britto John Baskar.A