locked
Creating a ticket helpdesk RRS feed

  • Question

  • Is there any way to add javascript during a workflow?

    We are creating a helpdesk system and when an email comes in a workflow turns this into a case.

    The final step of the workflow is to create an email and send it back to the client saying that their email has been logged. What we want is for a ticket number to be generated in the workflow and included in that email

    Is this possible?

    We are using CRM Dynamics 2011 on prem 

    many thanks

    David

    Tuesday, August 20, 2013 9:03 AM

All replies

  • Hi David,
    if you want to send an email to advice that the email was received and include inside the ticket number, you just need to create another workflow that will start when a new case is created. Inside the email you can insert the ticket number and other fields as well.


    My blog: www.crmanswers.net

    Tuesday, August 20, 2013 9:17 AM
  • so you think its better to put this into two seperate workflows basically?

    one to create the ticket

    one to email the client back with the ticket number etc

    I was trying to do this in 1 workflow 

    Tuesday, August 20, 2013 9:31 AM
  • Hi David,

    One workflow should be fine. Create the Case in the workflow and then add a send email step where you can add any fields from the created case. See below for example of adding the generated Case Number in the send emailstep of a workflow:

    Workflow:

    Email sending step:

    Tuesday, August 20, 2013 9:39 AM
  • thank you for your help

    I think the problem is that we're using JS to create the ticket number and it only generates the ticket once you have clicked on the case to open it.

    So the Workflow creates the case and sends out the email before I have opened up the case and the script has generated the ticket number if thats make sense?

    David

    Tuesday, August 20, 2013 10:51 AM
  • Ok, I see. Yeah, the JavaScript will not be run in the workflow and there is no way to change this.

    Is there a specific reason that you are overriding CRM's default case number generation (CRM will auto generate a case number for you)? If you definitely want to override the default case number, then move the case number generation code to the Incident (Case) Pre-Create plugin. This will run when the form is saved and when the workflow creates the case.

    Tuesday, August 20, 2013 10:59 AM
  • well we've now created our own entity IT Support which we will use instead of Cases

    We also want to generate a ticket number which is more appropriate to our department rather than using the default CRM one

    Tuesday, August 20, 2013 11:30 AM