Workflow Action - OnChange script -- Where stored in MetaData?

Help please!  I am looking for some scripts in a system in which parts of it are being migrated to another system.

I am trying to locate Create Script or OnChange Script populated on a workflow rules actions.

I believe I have located the values for Create Script...They appear to be located in the field WkAc_EmailBody.  Therefore, I need to confirm that is correct. 

However, I have not been able to determine where the OnChange Script is located.

Any assistance would be greatly appreciated.  

Thank you!!

  • Actually, I don't think I have located the Create Scripts either! :-(

    Therefore, I need assistance with both the Create Script and the OnChange script

    Thank you!

  • Ok, the workflow tables are just plain weird.

    In the WorkflowActions table you will have 3 columns called WkAc_EmailTo, WkAc_EmailBCC, and WkAc_EmailBody. When you add a rule that isn't of type email, these fields do a different job. It's very poor in terms of design as you have a field that does multiple job which is just a database design "no no"

    Your create script lives in WkAc_EmailBCC

    Your on change script lives in WkAc_EmailBody

    Your validate script lives in WkAc_EmailTo

    Don't ask me why. The way to find out is to edit a standard workflow that you're not using, alter the script fields on a field and put in a comment like //create //onchange // validate and save and then query the tables looking for them. Hopefully I've saved you the job.

  • Does any of it get recorded if you create a component and script it out from there?

  • I think this is where Workflow is really weird again... unless Sage have resolved this. I haven't checked as I haven't done much in this area for a number of years. To script workflow to a component, you (certainly used to anyway) create a new component, then go to your workflow and script the workflow to the screen, then go back to your component and save it separately. The workflow is now in your component.

  • I just now tested this and the answer is No, it doesn't.  I could be wrong but it sure seems like a bug.

    I created a  zzTemp workflow to test with.  I then edited the Lead workflow and opened the Lead Assigned user ID field.  I added Create, OnChange and Validate scripts and saved the field and the workflow Step.  When I tried to script the component, CRM gave this message:

         No data found. The zzTemp.ecf and zzTemp .es files has not been created.

    This is in 2020 R2.  The scripts for each field were:

         // testing
         1=1;

    Granted these script don't do anything to the record, but it's all valid javascript and the UI did save the changes, so it should be part of the component.  So again, could be wrong but it appears to be a bug.