Thursday, December 20, 2012

Add mapping for custom attribute of Order product to Invoice product

To map custom attributes of Opportunity Product to Quote Product, Quote product to Order Product and Order product to Invoice product CRM does not provide direct access to the “Mapping” page. To get the mapping page, you need to follow below steps.

Below are the steps to set the mapping of Order product and Invoice product:

1.  Replace the CRM server name in the below URL and browse the below URL in the Internet Explorer.

 Online CRM

On-premise CRM
http://crmserver/testorg/XRMServices/2011/OrganizationData.svc/EntityMapSet?$select=EntityMapId&$filter=SourceEntityName eq 'salesorderdetail' and TargetEntityName eq 'invoicedetail

2.  Then you will get the below result. Copy the Entity map id highlighted in red.

When you try to browse above URL, you might get the below page instead of above result in XML format.

Then you need to do below setting in the Internet Explorer.
Go to Internet Explorer à Tool à Internet options àContent à Setting (Feed and Web slices). Now uncheck the “Automatic mark feed as read when reading a feed” and “Turn on feed reading view”. Click on Ok. Then restart the Internet explorer and browse the above URL again.

3. Replace the mapping id with the entity map id you get from above URL in the below URL and then browse it.

4. You will get the below window where you can add new mappings,

Hope this helps!

Sunday, December 16, 2012

Display more than 2000 characters in SSRS report

We would like to share one of our experiences with SSRS reports. One of the reports we were building required displaying of notes that could hold more than 2000 characters.
 Including a text box worked fine for most of the records but we observed that the ones that had more than 2000 characters reported error. To show the entire content of the notes in SSRS reports you can try the following workaround:
Add a textbox with the following expression

 =IIF(Len(Fields!description.Value) >= 2000,Left(Fields!description.Value,2000) ,Left(Fields!description.Value,2000))
This will show the first 2000 characters.
For the next 2000 add a blank row and include a textbox with the following expression
=IIF(Len(Fields!description.Value) >= 2000, cstr(Fields!description.Value).Substring(2000), "")
If the content included is less than 2000 characters in the first place itself, then to hide the blank row add the following expression to the visible property
=IIF(Len(ReportItems!txtDescription.Value) >= 2000,false,true)
Note ReportItems!txtDescription refers to the same textbox that we are hiding
This way we were able to increase the display limit to 4000 characters to increase it further add another text by using the same logic as above.

Hope this helps!


Friday, December 14, 2012

Developer Toolkit: "No Organization has been specified" error.

You may come across the following error when you try to open a project that was created using Developer toolkit

To resolve this problem you need to delete *.SUO(VS Solution User Option) file from Visual Studio Project folder.
(These file records all of the options that you might associate with your solution so that each time you open it, it includes customizations that you have made)
This .SUO file is hidden in the project folder next to solution file which you can see in below screenshot.
Simply delete the above selected red rectangle file(.SUO) and run solution file.
 Now it will prompt for Connect CRM Explorer.

Note: SUO (solution user options) are user settings files. Completely disposable, you can delete it and the most common thing you will lose are breakpoints.

Tuesday, December 11, 2012

Import attachments using OOB Import Wizard in Dynamics CRM 2011

As we all know that the there is no separate entity for the attachments in Dynamics CRM 2011. We can add the attachments into the Note (annotation) entity.
But in order to import Notes and attachments in the CRM 2011, it is essential that you must have the separate files for them.

For importing Notes with the attachments by the import wizard you need to Arrange all of your files and attachments into a zip folder as shown into the below screenshot.

Where the “Notes.csv” contains the data of the Notes as shown into the below screenshot.

And “Attachments” folder above contains all the attachment documents. The files contained in the Attachments folder are as shown below.

After that please zip both the Attachments folder and Notes.csv into a single folder, and then import with the following mappings.

After completing the import it will display the data as follows under the corresponding regarding records.

Important points to note:
  • Only map that column of the source file to the Document (documentbody) field of the Note record type which includes information about attachments. The mapped value in the source column to the document is the file name that is used to search a file in the Attachments folder in the .zip file.

  • Each note record can have one attached file. You cannot import attachments to e-mail messages, sales literature items, or to any record type that does not support notes. The types of files that can be attached are determined in the Set blocked file extensions for attachments section of the System Settings dialog box.

  • If you import file attachments, each attachment has two names: a physical name (Document in our case)and a logical name (File Name in our case). The logical names might not be unique. The physical names must be unique.

  • During import, you must map the column with physical names to the "Document" field of the Note record type. You must map the column with logical names to the "FileName" field of the Note record type.

  • The value in source column that is mapped to the Document is the file name that is used to search a file in the Attachments folder in the .zip file.

  •  Each attachment must have a unique name to import. It is mandatory to include a column for the physical names in the source file. Also include a logical names column assigned to the file that is imported. You must map the column containing the logical file name to the File Name attribute in the Note (annotation) record type.

  • We recommend that you map the column that contains information about the parent record to the Regarding field of the Note record type. This column creates the relationship between the note and the parent record to which the note is attached.

  • In the .zip file, the folder containing attachments must be named Attachments.
Hope you find this information helpful.