Advertisements

Archive

Archive for the ‘CRM 2011’ Category

Show custom messages as banner notifications – CRM 2011

November 17, 2013 Leave a comment

In CRM 2011, one way to show custom messages is using Jscript ‘alert’ function.

In one of our requirement we have to display a custom message on CRM form banner like OOB notification.

Notification

Notification

We can achieve this using Jscript, but it’s an unsupported way and there are no guarantees that this code won’t change in the future.

I am providing 2 scripts which is compatible Pre and Post UR 12.

Post UR 12

// Level – 1 (Critical), Level – 2 (Info), Level – 3 (Warning),

function addNotification(message, level) {

try {

var notificationsList = Sys.Application.findComponent(‘crmNotifications’);

if (notificationsList) {

notificationsList.AddNotification(‘noteId1’, level, ‘namespace’, message);

}

} catch (e) {

}

}

Pre UR 12

// Level – 1 (Critical), Level – 2 (Info), Level – 3 (Warning),

function addNotification(message, level) {

try {

var notificationsArea = document.getElementById(‘crmNotifications’);

if (notificationsArea) {

if (level == 1) { //critical

notificationsArea.AddNotification(‘mep1’, 1, ‘source’, message);

}

if (level == 2) { //Info

notificationsArea.AddNotification(‘mep3’, 3, ‘source’, message);

}

if (level == 3) { //Warning

notificationsArea.AddNotification(‘mep2’, 2, ‘source’, message);

}

if (message == “”) { // Clear the notifications

notificationsArea.SetNotifications(null, null);

}

}

} catch (e) {

}

}

How do I use the method

  • To show custom message as Information, pass message and Level =2

              addNotification(“This is sample message.”, 2);

Note – CRM 2013, has a new feature to display  Notifications which is a supported way.

🙂

Advertisements

‘Selected record types not defined for connection roles’ – Error

November 12, 2013 Leave a comment

In CRM, ‘Connections’ are relationships between two entity records in the system.  It’s a way to create a relationship (link) between two entities records.

I got the below error when I try to connect one of my custom entity record with ‘Account’ by the role ‘Referred by’

Connection Role - Error

Connection Role – Error

Fix

We have to configure the entity type on the “Connection Role”, Referred by

  • Go to ‘Advanced Find’ –> Connection Role
  • Open the ‘Connection Role’, ‘Referred By’
  • Choose the entity you want this ‘Connection Role’ work for
Connection Role - Record Types

Connection Role – Record Types

  • Save and Close

🙂

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