URL link to case sent via workflow RRS feed

  • Question

  • Hi Again......just a few remaining issues

    I want to send an email alert when a case is created to the assigned technician with the link to the case as a hyperlink in the email.

    I have this working however the only issue is that i need to re-open the case which i just created in order for the url/id to be created for that case.

    My code is as follows:

    // hide Link for Email field
    crmForm.all.new_linkforemailcase_c.style.visibility = 'hidden';
    crmForm.all.new_linkforemailcase_d.style.visibility = 'hidden';

    //Code below to save URL of Case which is then attached to the email workflow. var objId; var caseUrl; if((crmForm.all.new_linkforemailcase.DataValue == null) || (crmForm.all.new_linkforemailcase.DataValue == "")) { if(crmForm.FormType == 2) //Checks to see if this is an update Form (value of 2) { var embedUrl; caseUrl = "http://crm/cs/cases/edit.aspx"; //Default Path to the Edit.aspx page for a Case objId = crmForm.ObjectId; //Retrieves the ID of the current object embedUrl = caseUrl + "?id=" + objId; //pieces together the items required for a full Url crmForm.all.new_linkforemailcase.DataValue = embedUrl; //Sets the value of the field crmForm.all.new_linkforemailcase.ForceSubmit = true; crmForm.Save(); } }
    The above code is currently in the OnLoad event however i have also tested it in the OnSave event of the form with the same result.

    My Workflow has a wait conditions on the new_linkforemailcase field until data is attached to it. The ID is not attached to the field until i open the case again.

    I thought when i create a case and click "Save and Close" it instantly gets assigned the ID for the url??

    Please help.
    Monday, February 1, 2010 1:02 PM


All replies

  • Hi Morjo,
    You can use CRM Accelerator: Business Productivity Workflow Tools which is extension for workflows and one of new things is sending a links for CRM records.
    It's working great and you don't need any custom code.


    My Dynamics CRM Blog: http://bovoweb.blogspot.com
    • Proposed as answer by kgorczewski Monday, February 1, 2010 1:13 PM
    • Marked as answer by Morjo Monday, February 8, 2010 12:47 PM
    Monday, February 1, 2010 1:13 PM
  • I had a read and watched the videos.....looks pretty straight forward.

    Will download and install the CRM plugin registration tool and proceed to install the accelerators.

    Will provide you with an update on how it goes :)

    Thanks very much for the advise.
    Monday, February 1, 2010 1:50 PM
  • Works great thanks.
    Monday, February 8, 2010 12:47 PM
  • I already have CRM Business Productivity Workflow Tools installed on another org in dev. I am trying to get it to work on yet another org in dev.

    Scenario: I need a workflow that when a specific attribute is changed in one entity (ProForma), the workflow will create a new record in another entity (client) and send an email to a user with the hyperlink to the new record.

    I can't get workflow tool to work for me.

    What I have so far in the workflow

    _Condition: poinpoints the specific field in the main entity

    _Create : new record in other entity

    _send an email. question: what would the url be for the new record?

    Thank you


    Friday, August 20, 2010 5:51 PM