Skip to content

Tutorial 9

PhuocLe edited this page Aug 27, 2018 · 12 revisions

Task

  • When a lead qualified, send an email (with an email template) notification to all team members of the current user belong to teams

Prerequisites

Explain

This tutorial is the combine of these tutorials: 5, 6, 7, 8 that make the final solution the customer want

  1. User create a new lead then send an email to all team members
  2. If user has security role "Qualify Lead", they can see the button "QUALIFY"
  3. User click button "QUALIFY", it create Account and Contact then redirect to Account created
  4. Process "QUALIFY" should copy field Field1, Field2, Field3 from lead to account
  5. When lead qualified then send an email to all team members

Coding

Ribbon Workbench

  1. Hide 4 button in the Homepage of Lead entity
    • Mscrm.HomepageGrid.lead.ConvertLeadAs
    • Mscrm.HomepageGrid.lead.ConvertLeadAs.Web
    • Mscrm.HomepageGrid.lead.ConvertLeadQuick
    • Mscrm.HomepageGrid.lead.ConvertLeadQuick.Web
  2. Hide 4 button in the Form of Lead entity
    • Mscrm.Form.lead.ConvertLeadAs
    • Mscrm.Form.lead.ConvertLeadAs.Web
    • Mscrm.Form.lead.ConvertLeadQuick
    • Mscrm.Form.lead.ConvertLeadQuick.Web
  3. Copy button
    • Mscrm.Form.lead.ConvertLeadAs and paste as name paz.Mscrm.Form.lead.ConvertLeadQuick
    • Mscrm.Form.lead.ConvertLeadQuick.Web and paste as name paz.Mscrm.Form.lead.ConvertLeadQuick.Web
  4. Edit Customise Command of 2 button paz.Mscrm.Form.lead.ConvertLeadQuick, paz.Mscrm.Form.lead.ConvertLeadQuick.Web
  5. Add enable rule
    • Id: paz.lead.EnableRule.HasRole
    • CustomRule
      • Default: True
      • FunctionName: isNaN
      • Library: $webresource:paz_/lib/WebApiClient.js
    • CustomRule
      • FunctionName: formLead.HasRole
      • Library: $webresource:paz_/entities/Lead.js
      • String Parameter: Qualify Lead
Clone this wiki locally