Experience your
30 day trial
now!
GET STARTED
CRM MVP Mitch Milam returns as a guest blogger. You can read more at his blog.
While working on any CRM installation, you will inevitably find yourself needing to record possible enhancements to the system. What better place to store that information than within CRM itself?
The Enhancement Entity
We will first need to create a new entity called Enhancement, which will look like this:
As you can see, the Ownership type is set to User so that each Enhancement can be assigned to a specific CRM user.
Since this Entity will generally be used by System Administrators or System Customizers, we’re only going to expose it in the Settings Area.
I’ve decided to name the Enhancement’s Primary Attribute Topic, which will record the Entity, area of action, or section within CRM that needs to be modified:
Adding Attributes
The following attributes are added to the Entity:
Attribute
Type
Length / Characteristics
Required
Description of Change
Nvarchar
255
Yes
Detail
Ntext
2000
No
Expected Delivery Date
Datetime
Date Only
Date Completed
Status
Picklist
Values:
Completed
Denied
Duplicate
In Progress
New
On Hold
Pending
Researching
Priority
1
2
3
4
5
6
7
Percent Complete
Int
Range: 0 – 100
Feel free to make changes to this structure as your needs dictate.
Status Attribute OnChange Event
We have just a minor amount of JavaScript in this solution, and it is really just to help with the final disposition of the Enhancement request.
If the user selects a Status of Completed, it will set the Percent Complete value to 100 and the Date Completed to today’s date. Afterwards, both attributes will be disabled so they can’t be changed:
if (event.srcElement.DataValue == '7') /* completed */ { crmForm.all.m3_percentcomplete.DataValue = 100; crmForm.all.m3_percentcomplete.Disabled = true; crmForm.all.m3_percentcomplete.ForceSubmit = true; crmForm.all.m3_datecompleted.DataValue = new Date(); crmForm.all.m3_datecompleted.ForceSubmit = true; } else /* in case someone changes their mind */ { crmForm.all.m3_percentcomplete.Disabled = false; crmForm.all.m3_datecompleted.DataValue = null }
if (event.srcElement.DataValue == '7') /* completed */
{
crmForm.all.m3_percentcomplete.DataValue = 100;
crmForm.all.m3_percentcomplete.Disabled = true;
crmForm.all.m3_percentcomplete.ForceSubmit = true;
crmForm.all.m3_datecompleted.DataValue = new Date();
crmForm.all.m3_datecompleted.ForceSubmit = true;
}
else /* in case someone changes their mind */
crmForm.all.m3_percentcomplete.Disabled = false;
crmForm.all.m3_datecompleted.DataValue = null
Form OnLoad Event
To ensure that our form displays properly, we need to check the Percent Complete Attribute and if it set at 100%, we’ll disable the field:
if (crmForm.all.m3_percentcomplete.DataValue == 100) { crmForm.all.m3_percentcomplete.Disabled = true; }
if (crmForm.all.m3_percentcomplete.DataValue == 100)
Final Result
And here is what the user will see when creating a new Enhancement Request:
Conclusion
Today I’ve shown you how to create a simple Enhancements Request system within CRM. You can expand on this solution by adding workflow automation to send out notifications, make sure deadlines are met, etc. with just a little more effort.
The customizations for this solution have been uploaded to the Free Utilities section of my blog for your convenience.
Cheers,
Mitch Milam