Workflow Rule: Change from a table to a view

Looks like I need a shove in the right direction in regards to a Workflow Rule. :-)

From within Sage CRM, is it possible to change the view being used for a workflow rule? When a rule is created, the user selects a table or a view to be used for the rule. After this selection is saved, I don't see a way from within Sage CRM to change it. If there is a way to modify this from within Sage CRM, please point me in the right direction.

Otherwise, I am assuming that this is set in the Metadata somehwhere and I can (very carefully) change it in the SQL database.

Any assistance would be greatly appreciated.

Thanks!

  • 0

    Good morning, Michelle,

    You can try the below. They're to be run separately within SQL Server Management Studio using the CRM database. First line of the query shows all of the rules. Second updates it to the proper view using the Workflow Rule Id.

    Select * from WorkflowRules -- where wkrl_caption = '[Your Workflow Rule"s name]'

    Update WorkflowRules Set WkRl_Table = '[vYourView]' where wkrl_ruleid = '[your workflow rule id]'

    I added the "where wkrl_caption =" line, but commented it out. Without it, the query returns all rules. If you provide the caption name for the rule, it'll at least limit what you're seeing.

    What I've seen is that you're able to change the workflow rule whenever there's no actions attached to it. Once an action is related, the view/table associated with the rule gets locked. I would make note of whatever value exists in the WkRl_Table value prior to running the update script just in case it backfires so you can set the one value back. I don't foresee it being an issue, but it's always a best practice. :)

    Hope that helps.

  • 0

    Thanks Basil! That all makes sense. I understand the reason for the lock down. In my case, I should be OK as I am not taking any fields away...just adding them.

    I will update the view through Management Studio. Thank you for pointing me in the direction I need to go with the tables and the query.

    Your assistance is greatly appreciated!