Archive

Archive for the ‘CRM 2011’ Category

Undefined Error – Activity Feeds CRM 2011

November 5, 2013 Leave a comment

You might have experienced the below script error, when you click on ‘What’s New’ link on Sitemap

Activity Feeds - Script error

Activity Feeds – Script error

To fix this error, check if the logged in user has “Activity Feeds” security role or not.

Activity Feeds Security Role

Activity Feeds Security Role

 

“Activity Feeds” security roles comes, when you import the “Activity Feeds” managed solution in to your CRM application.

Every user other than ‘System Administrator’ should have “Activity Feeds” security role to view feeds.

Notifications using script – CRM 2013

October 21, 2013 3 comments

CRM 2013 has a new feature to display notifications (i.e., Errors,Warnings and Information’s) like a banner message using JavaScript.

Notifications

Notifications

We can create both Form level notifications as well as Field notifications.

  • Form notifications
    • This method display notifications on the top of the record form.

              Syntax – Xrm.Page.ui.setFormNotification(<Notification message>,’ ERROR\WARNING\INFORMATION’);

Form Notifications

Form Notifications

  • Field notifications

              Syntax – Xrm.Page.getControl(Field).setNotification(<Notification message>);

Field Notifications

Field Notifications

Observations

  • The Save action happens even if you have form level error notifications
  • The order of notifications are 1) Information notifications 2) Error notifications and 3) Warning notifications
  • The banner only show 3 rows of notification, the user has to scroll down to see the other
  • Use Xrm.Page.ui.clearFormNotification() to clear the banner notifications

Refer this link for more details

🙂

Categories: CRM 2011 Tags: , ,

Legacy Feature Check Tool – CRM

October 15, 2013 1 comment

The next major release of CRM (CRM 2013) is slated to release and will be dropping support for some of the legacy features.

The following legacy components that will not be supported in the next release:

  • The 2007 web service endpoint from HTML\JavaScript web resources.
  • Plug-ins and custom workflow activities built using the Microsoft Dynamics CRM 4.0 SDK.
  • ASPX web pages in the ISV folder.
  • The 2007 endpoint from external applications using IIS logs.

Legacy Feature Check Tool

  • The “Legacy Feature Check Tool” tool scans the deployment (plug-ins, web resources, IIS logs, and more) and detects the legacy components.
  • The tool is safe to run on production deployments and does not update or modify any data or configurations in the deployment

How to run the tool

  • Open the CRM web server
  • Copy the “LegacyFeatureCheck.zip” folder and extract
  • Open the command prompt and point to the “LegacyFeatureCheck” folder
  • Run the tool with the /? command-line argument to get the usage instructions
Legacy Feature Check - Help

Legacy Feature Check – Help

  • To inspect one of my organization named “Venilla” for legacy features, run following command

Microsoft.Crm.LegacyFeatureCheck.exe /org:vanilla /out:log.xml

Legacy Feature Check

Legacy Feature Check

  • It writes the log into ‘log.xml’, on the “LegacyFeatureCheck” directory
  • The XML will be in below format with issue will be given in <VerificationResult> node

<DeploymentVerificationResults>
<Result>
<OrganizationName>***Deployment***</OrganizationName>
<OrganizationId>00000000-0000-0000-0000-000000000000</OrganizationId>
<Issues>0</Issues>
<Results />
</Result>
<Result>
<OrganizationName>Venilla</OrganizationName>
<OrganizationUniqueName>Venilla</OrganizationUniqueName>
<OrganizationId>f50b3196-b029-e311-bb69-00155db03129</OrganizationId>
<Issues>1</Issues>
<Results>
<VerificationResult>
<Severity>Warning</Severity>
<Component>PluginAssembly</Component>
<ComponentId>b7bed020-bed1-e111-83d9-0019b9f8f548</ComponentId>
<Message>
Assembly “Venilla.Crm.Workflow” with version ‘1.0.0.0’
references the CRM 4.0 SDK.
</Message>
</VerificationResult>
</Results>
</Result>
</DeploymentVerificationResults>

🙂

Plug-in on related entities during ‘Cascade All’ actions

Assume the relationship behavior between ‘Contact’ and ‘Appointment’ is “Cascade All” on ‘Assign’ action.

Relationship Behavior

Relationship Behavior – Assign – Cascade All

By virtue of that, if a Contact has 2 Appointments, if I change the owner of ‘Contact’ the related 2 Appointment owner also changes.

In one of the requirement, we have to restrict the Cascade operation based on business logic on child record (i.e.,  Appointment)

So I registered a Plugin on ‘Assign’ of ‘Appointment’ and want to handle the Cascade operation, but the Plugin never get executed.

Reason & Solution

  • CRM treats Cascade Assign operation on Child records as an Update.
  • Register the Plug-in on ‘Update’ instead of ‘Assign’ message.
  • In the Update plug-in, the Target entity only contain ‘Owner’ field

🙂

CRM 2013 – Release Preview Guide

September 18, 2013 Leave a comment

Next major version of CRM release, CRM 2013 is due to release in the fall of 2013.

The CRM 2013 “Release Preview Guide” highlighting some of the key investment areas is available.

  • Click to Download  Release Preview Guide
  • Click here to see – What’s Changing in the Next Major Release

Multiple forms of type Main are found. No Record Walls are added – CRM 2011 Activity Feeds Error

August 28, 2013 2 comments

I was getting below warning message, when I tried to configure Activity Feeds for entity ‘Contact’ and selected the “Enable walls for this type of record form” check box

Multiple forms of type Main are found. No Record Walls are added. Configure the walls to the required forms manually

Activity Feeds Configuration

Activity Feeds Configuration

Reason

The reason was, my ‘Contact’ entity has multiple forms of type “Main” configured and CRM does not allow us to check  “Enable walls for this type of record form” check box.

Contact Entity Multiple Forms

Contact Entity Multiple Forms

So to configure the walls for ‘Contact’ entity, we have to do it manually by following below steps

How to configure “Record Wall” to required forms manually

To configure wall manually

  • Choose the form you need to show the record wall for among multiple forms
  • Open the Form Editor
    • Insert a new Tab with single column (Go to Insert > Tab > One Column)
    • Open the Tab to edit (Go to Tab Properties > Display)
      • Name= tab_recordwall
      • Label = Record Wall
      • Uncheck “Expand this tab by default”
    • Tab Properties > Events
      • Form Libraries, add “msdyn_/ActivityFeeds.Form.js” file
      • In event handlers, Add
        • Library: msdyn_/ActivityFeeds.Form.js
        • Function: ActivityFeeds.Form.CustomizationUtils.updateRecordWallRenderingState
        • Check “Enabled.
        • Check “Pass execution context as first parameter”
Tab Properties

Tab Properties

 
  • Save your changes to the tab and return to the form editor.
  • Select the section inside of the “Record Wall Tab”.
  • In the Form Editor, Add ‘RecodWall.htm’ file by click Insert > Web Resource
  • In the “Record Wall” Tab’s ‘Section’, choose ‘General’ tab and set
    • Web resource = msdyn_/RecordWall.htm
    • Name = RecordWall
    • Visible by Defualt = checked
    • Pass record object…= checked
Record Wall Tab's Section Properties

Record Wall Tab’s Section Properties

  • In the “Record Wall” Tab’s ‘Section’, choose ‘Formatting’ tab and set
    • Layout > One column
    • Row Layout > 15 rows (this is flexible, but 15 is standard the standard look).
    • Display border = yes
    • Scrolling = as necessary
  • Save & publish

🙂

Xrm.Utility is undefined error – CRM 2011

Other day when I deployed my solution on a new CRM server, I was getting “Xrm.Utility is undefined” script error.

I refered“Xrm.Utility” JScriptin my code to open forms which was causing script issue.

Reason & Fix

  • The CRM server is not having UR 8
  • Since Xrm.Utility object was added in CRM 2011 Update Rollup 8, installing UR 8 on server solved the issue

🙂

Merging solutions in CRM 2011

July 17, 2013 2 comments

Imagine you have 2 developers (Dev 1 & Dev 2) in your team working on 2 different organizations and 2 solutions, at the time of every release, you need to merge the components of both developers in to 1 solution.

One way is

  • Import Dev 1 & Dev 2 solutions in to another new organization.
  • Create a new solution and add the components of both solutions manually
  • This is easy if Dev 1 & Dev 2 solutions has less components.

What if the components are huge? you need to manually pick and add components both solutions in to a single solution or

Another way of merging solutions

  • Export & Save the both Dev 1 & Dev 2 solutions
  • Extract the saved solution .zip folders
  • Open “Solution.xml” files in both solutions in a notepad
Solution components

Solution components

  • In the <UniqueName> node, provide same unique name in both “Solution.xml” files
SolutionXml file

SolutionXml file

  • Import them back to new a organization
  • After the import, we get a new merged solution.
  • This is easier way of merging if the solutions has lot of components

Refer below MSDN video for more details

🙂

Categories: CRM 2011 Tags: , ,

event.returnValue is not working after UR 12 – Fix

July 15, 2013 2 comments

We use event.returnValue=false statement, to stop the event execution. (i.e., I can stop my crm form’s save action, if I write event.returnValue=false statement on my onsave() event).

After I upgraded to UR12, I was getting script error, if I use the event.returnValue statement.

Reason

  • Update Rollup 12 and December 2012 Service Update support additional browsers by generating HTML that supports W3C standards.
  • This requires removing dependencies on HTML components (HTC) that are specific to Internet Explorer.
  • Hence event.returnValue statement has been deprecated

Fix

  • Use context.getEventArgs().preventDefault() function to cancel the event execution

How do I use this

  • First to get “context”, enable the OnSave event handler to pass the execution context as the first parameter to the OnSave event handler.
  • Open customization form -> Form Properties and in “Handler Properties” window, select the “Pass execution ….” checkbox
  • Pass execution context

    Pass execution context

  • Next in your Jscript , read the context as first parameter

function onsave(context) {

// Prevent the event execution

context.getEventArgs().preventDefault();

}

Get more details on latest CRM JScript changes from this link

🙂

CRM online instance opening only in Mobile version – Fix

July 10, 2013 2 comments

The other day, when I upgraded to IE 11 browser and when I browse my CRM online URL, I was getting only mobile version (i.e., http:// Orgname.crm5.dynamics.com/m/default.aspx).

CRM Mobile Version

CRM Mobile Version

Even if i explicitly provide the URL http:// Orgname.crm5.dynamics.com/default.aspx, it was redirecting to Mobile version Reason

  • CRM online is not compatible with IE 11

Fix

  • Add CRM online site to IE 11 compatibility list
  • Go to Tools -> Compatibility View Settings
  • Add the “dynamics.com” website to compatibility view settings by click on “Add”
Comaptibility Settings

Compatibility Settings

  • If its “OnPremise” add CRM server name to compatibility view settings.
  • Refresh the browser

🙂