Sunday, October 2, 2011

Modifying Quote Templates in CRM 2011

Since we all don’t work for Adventure Works, Inc., organizations that use the quote entity to send quotes to customers will ask their administrators to modify the out-of-the-box quote template. It’s not as straight-forward as it seems and you could easily corrupt the original mail merge template so I wanted to give instructions to help you along.
Standard instructions will probably tell you to click on ‘Settings’, ‘Templates’, ‘Mail Merge Templates’, then change the view to see all templates and double-click the template you wish to modify.
clip_image002
clip_image004
Yes, you can go about it this way, but editing the mail merge template is certainly an iterative process so I’m going to suggest go to another location to modify your templates. By going to the quote entity and opening a quote, you save some steps as you save your changes and then run through the mail merge of the quote to see how they look. So with a quote open, do the following:
1. Click on the ‘Print Quote for Customer’ button.
clip_image006
2. Select the type of mail merge template document and click the lookup icon. (I suggest using one ‘Organizational mail merge template’ to insure uniformity in the documents you send out to your customers.)
clip_image008
3. Select the out-of-the-box template named, “Quote for Customer”, and click ‘Properties’.
clip_image010
4. The following window will pop up. Click ‘Edit Template in Word’.
clip_image012
5. Next, click ‘Open’.
clip_image013
6. Microsoft Word will open.
a. If you are using Word 2010 it is very likely you will see the following across the top of the screen. Click ‘Enable Editing’.
clip_image015
b. Next, you may get prompted by another similar message. Click ‘Enable Content’.
clip_image017
7. The document tells you, “To start the mail merge, click CRM.” However, you actually need to click on the ‘Add-Ins’ menu item and click ‘CRM’. Note: Depending on the version of Word you have, you may have to click ‘Mailings’ or ‘Add-Ins’ to get to the ‘CRM’ button.
clip_image019
8. Next, the following screen will pop up. Click ‘OK’.
clip_image021
9. Now you can begin to edit your template.  If it looks like the screenshot below, hit ‘Alt+F9’.
image
It will display more of the editable areas of the template.
clip_image023
Below, outlined in green, are changes I made to the logo, the address tables and at the bottom of the template. Along with the ability to remove merge fields using the delete button, you can add merge fields by clicking the ‘Insert Merge Field’ button on the ribbon, outlined in blue with the arrow pointing to it. Lastly, I suggest avoiding making changes in the section outlined in red unless you absolutely must. This is where the quote product data is entered and calculations take place. I don’t see a need to edit this section.
clip_image025
10. Upon completing your changes, click on ‘File’, ‘Save As’.
IT IS OF THE UTMOST IMPORTANCE THAT YOU CHOOSE ‘SAVE AS’ INSTEAD OF ‘SAVE’ TO AVOID OVERWRITING AND CORRUPTING YOUR ORIGINAL MAIL MERGE TEMPLATE!!! You may ask why we don’t save a copy of the template before we start any of this. The problem with that is the original file is a “.doc” file and if you make a copy of it, all of the back-end functionality of the mail merge is lost.
You’ll notice that it will save the file as “.xml” instead of a “.doc” file, which is the type of your original template. Be sure to save it as an XML file.
clip_image027
11. Now go back and repeat steps 1 & 2 to get to the screen below where you can choose your template except this time click on ‘New’.
clip_image029
12. The following window will pop up. Fill in the information outlined in red. Then browse for your newly saved template and click ‘Attach’.
clip_image031
13. Once the screen refreshes, you’ll notice your file name changed to blue. You will also have a new button called ‘Actions’ on the menu bar. In that menu, select ‘Make Available to Organization’ to make your template viewable by everyone. And fear not, once you make it available to the organization, you can always go back to ‘Actions’ and click the ‘Make Personal’ menu item to make it just yours again.
clip_image033
14. You’ll end up back at this screen. Choose your new mail merge template and click ‘OK’.
clip_image035
15. Click ‘OK’ at the next screen.
clip_image037
16. Microsoft Word will open.
a. If you are using Word 2010 it is very likely you will see the following across the top of the screen. Click ‘Enable Editing’.
clip_image038
b. Next, you may get prompted by another similar message. Click ‘Enable Content’.
clip_image039
17. The document tells you, “To start the mail merge, click CRM.” However, you actually need to click on the ‘Add-Ins’ menu item and click ‘CRM’. Note: Depending on the version of Word you have, you may have to click ‘Mailings’ or to get to the ‘CRM’ button.
clip_image040
18. Next, the following screen will pop up. Click ‘OK’.
clip_image042
19. Click on ‘Next: Preview Your Directory’ in the lower, right corner of the Word window.
clip_image044
20. Click on ‘Next: Complete the merge’ in the lower, right corner of the Word window.
clip_image046
21. Click on ‘To New Document…’ in the top, right of the screen.
clip_image048
22. Click ‘OK’ at the next pop up screen.
clip_image049
23. And behold the culmination of your hard work!
clip_image051
Don’t be surprised if you don’t get everything looking right the first time. In that case, go back and repeat steps 1 – 10, but this time be sure to edit the new mail merge template you created instead of the original. Next, repeat steps 1 – 3. In step 4, remove the old file from the bottom and attach the new file you just created. I name my files with an incremental number after each one as I develop the quote in case one of my attempts ends up rendering the template inoperable. So in this case, I would replace the file “CustEffective Quote.xml” with “CustEffective Quote1.xml”. Repeat this last paragraph as many times as needed to get your quote looking beautiful.

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!

Saturday, August 20, 2011

Dynamics CRM 2011 Charts, Views and Data Grids

Here is a good article that would definitely get you started on the most interesting aspect of CRM 2011, yes CHARTS...CHARTS...that every stakeholder of the CRM is interested in...

http://www.dynamicscrmtrickbag.com/2011/01/19/2011-charts-views-and-data-grids/