Tuesday, September 27, 2011

Generating Quotes in Microsoft Dynamics CRM 2011

Creating quotes, orders, and invoices in Microsoft Dynamics CRM 2011 is easy and very useful.  Once an opportunity has been created and you have established your product catalog in the system, generating a customer quote is simple and can be done in 6 short steps.
Follow these 6 short steps to quickly create a customer quote in Microsoft Dynamics CRM 2011:
Step 1: Start by opening the opportunity in CRM you want to generate a quote for.
*Make sure you have System Calculated selected in the Forecast Information section and select the relevant price list for the product you are quoting.  Save the opportunity.
Step 2: Select Line Items in the Information section and click inside the Line Items sub-grid.  A new tab titled List Tools will appear at the top.  Select Add New Opportunity Product and select the Write-In product option.
CRM 2011 Opportunity Product Screen
Step 3: Give your product a name in the Write-In product field and specify your product values in the Pricing field.  Save after this is completed.  The system will calculate your extended amount.  Save and close.
*Note that you can add multiple line items by repeating steps 2 and 3.  For example: you may    add services, annual enhancement plans, user license fees, etc.
Step 4: Select General from the Information section then select Recalculate Opportunity.  Your total will be calculated and displayed in the Est. Revenue field.  Save the opportunity then select Quotes in the Sales section.
Step 5: Select Add New Quote and a new quote form will be generated.  All of your line items will appear in the quote.  (Verify all of your products have been brought over by selecting Products under the Common section in the left navigation.) You are able to add costs you don’t want in your opportunity record to the quote by selecting Add Quote Product, then select Recalculate.
Step 6: Finally, select Run Report on the Data tab and select Quote.  The Report view will open and display your quote.  From here you can easily export the quote to many different formats including: XML, CSV, PDF, MHTML, Excel, TIFF, and Word.
CRM 2011 Final Quote Screen
Integrate your quotes, orders, and invoices with your back office in Microsoft Dynamics® GP or Microsoft Dynamics® AX.

Saturday, September 17, 2011

How to Hide a Dashboard in Microsoft Dynamics 2011

In Microsoft Dynamics CRM 2011 there are a number of predefined system dashboards:
image
In many cases, organizations/clients may or may not have need of some of these “out-of-the-box” dashboards.  They might, however, have need of them in the future.  So how do you remove them from a user’s view, but preserve them so you can bring them back in the future?  In my particular situation, the question came up, “How do you remove these, but not delete them?”  Great question.
There is not an out of the box way to “hide” a dashboard with the current Microsoft Dynamics CRM 2011 functionality.  But there are some options to preserve the original dashboards, while removing them for your users.
One way to do this is to export the dashboard to a solution file, then delete the original dashboard. In CRM 2011, create a solution in settings-->Solutions.  Click add existing dashboard, and select the dashboard that you want to remove.  Then export the solution and save the exported file in your source code repository of choice.  This file will contain a backup of the original system dashboard, and you can then delete the dashboard from your CRM 2011 system.  Should you ever change your mind down the road, you can restore the deleted system dashboard by importing the solution file.
Another option is to create a NEW Dashboard, based upon the existing dashboard.   This can be done by clicking on “Save As” from the Ribbon Menu Bar:
image
So for this example, let’s assume we like the Marketing Dashboard, but would rather hide it from users until a time when we want to use it.  By clicking "save as," I’ll create a personal dashboard, based upon the Marketing Dashboard.  The personal version will, by default, be only be visible by me:
image
In this case, I’ll just add “ORIGINAL” onto the end of the name of the dashboard, so that I’ll know the source.  Now that I have a my dashboard saved as a personal dashboard, which only I can see, I can now remove the dashboard that I do not want to be seen in my users’ Dashboard list.  This can be done through Customizations:
image
In this case, I checked the “Marketing Dashboard” on my list and clicked “Delete”.  You will get a Confirm Deletion dialogue box.  Click “OK” and the Dashboard is deleted.  To confirm this, we can go back to our Workplace –> Dashboards and see that it is no longer in our listing:
image
So now that you have a backup personal copy of the marketing dashboard, you can use it as a point of reference should you ever want to reconstruct the deleted dashboard as a system dashboard, or you can just share your personal dashboard copy with other users.  This is done by selecting the dashboard, “Marketing Dashboard – ORIGINAL” – and then clicking the “Share This Dashboard” button on the Menu Bar.  This will bring up the sharing dialogue box.  You can then share the Dashboard with an individual user or Team.
image
You can also rename the Dashboard in the customization-->dashboards area, if you would like to do so.
Good luck with your Microsoft Dynamics CRM 2011 implementations and configuration!

Tuesday, September 13, 2011

Disable All Fields in a Section Based on the Value of Another Field (CRM 2011)


There are SDK and web examples of how to disable or hide an entire tab on a form in Microsoft CRM 2011, but I was unable to find an example of how to just disable all the fields in a given section on the form based on the selection of a boolean option ("Two Option" field).
The scenario is useful if, for example, you want to disable data entry in the fields of a section under certain conditions, but you want to still display the disabled fields (rather than change their visibility and hide them). You could reference each field in the section by name and add the .setDisabled(true) method to the end of the control. But this is messy - what happens if later on the fields in the section are changed by adding new ones or removing others?
The script I came up with below handles this pretty nicely. All you need to know is the label of the section you're concerned with. In this example, I have a boolean field on another section (that's important - you don't want to disable this field and then the user can't change it back!).
//THIS FUNCTION DISABLES ALL THE FIELDS IN THE SECTION LABELED "FINANCIAL INFO"
//IF A BOOLEAN OPTION FIELD IN ANOTHER SECTION CALLED new_toggleSectionFlds = TRUE

function DisableSectionAttributes() {
    function setFldDisabled(ctrl) {
        ctrl.setDisabled(true);
    }
    function setFldEnabled(ctrl) {
        ctrl.setDisabled(false);
    }
    var toggleSectionFlds = Xrm.Page.getAttribute('new_toggleSectionFlds').getValue();
    var ctrlName = Xrm.Page.ui.controls.get();
    for (var i in ctrlName) {
        var ctrl = ctrlName[i];
        var ctrlSection = ctrl.getParent().getLabel();
        if (toggleSectionFlds == true) {
            if (ctrlSection == "Product Info") {
                setFldDisabled(ctrl);
            }
        }
        else {
            if (ctrlSection == "Product Info") {
                setFldEnabled(ctrl);
            }
        }
    }
}
Put this function in a web resource and then reference it from your form. Call the "DisableSectionAttributes" function in the OnLoad of your form, and in the OnChange of the new_toggleSectionFlds field. Notice that the section name "Product Info" is specified in both the "if" and the "else" part of the function - otherwise you would end up disabling all the other fields on the form!

Saturday, September 10, 2011

Control Visibility and Read/Write Permissions with Field-Level Security in Microsoft Dynamics CRM 2011

Recently, we have highlighted new auditing and role-based form functionality in Microsoft Dynamics CRM 2011.  Another solid new enhancement in CRM 2011 is field-level security, a feature that controls the ability of users or teams to view or edit a custom field’s contents. Based on their security role in the organization, users can be granted different levels of field security permissions, ranging from Create to Update to Read-Only access. This is a significant improvement from field-level security in CRM 4.0, in which users could access either all or none of the fields on a record out of the box. Fields or tabs could be hidden with custom code, but this method was unsupported.
To demonstrate field-level security, I created a new custom field on the Account form, which I called “Test Field.”  The first step is to select “Enable” for Field Security as seen below.
field 1
Next, you go to Settings – System – Administration – Field Security Profiles.
field 2
Then, you create a new Field Security Profile.
field 6
For this example, I labeled the new Field Security Profile as “Test Field.”
field 7
After saving the “Test Field” Field Security Profile, you select Field Permissions on the left and the Edit button to edit the Read, Update, and Create permissions.  Below, I opted for this security profile to only have Read access of the field labeled “Test Field.”
field 3

Next, you select Users on the left and the Add button to add all the appropriate members that you want to belong to and abide by the business rules of this Field Security Profile.
field 8
Below, shows how the newly published field appears to users in the Field Security Profile of “Test Field” on the Account form based on our sole selection of the Read-only permission.  You will notice the field is grayed out.
field 11
A system administrator or other user with all privileges would be able to create, view, and update the field as seen here.
field 10
If no permissions were granted in the Field Security Profile, the Test Field would be filled in with a couple of dots as seen below.
field 9
Enjoy taking advantage of this field-level security functionality in your organization.  Stay tuned for more tips and tricks on using Microsoft Dynamics CRM 2011!