Monthly Archives: January 2013

How – To Series 16: UR 12 – Downside of Auto Save feature

Update: This issue is fixed now with MS CRM 2013 Org Level Setting. Following is the update:
https://connect.microsoft.com/dynamicssuggestions/feedback/details/777281/ur-12-auto-save-feature-causing-workflows-plugins-to-be-triggered-multiple-timesHi all,
UR 12 has introduced a nice feature called “Auto Save” which will save the CRM Records(only Process Driven UIs) in the background automatically when it get updated by the user in UI.

When a field value changed by user, in the bottom right corner a label as “Unsaved Changes” gets displayed:

After few seconds(15-20 sec), forms gets saved automatically:

From usability point of view, it’s a very nice feature… then what’s going wrong??

When I came to know about this feature, few things came to my mind:

Scenario1: Lets say I have registered a workflow or a plugin on “onChange” of a field called “fax” in “account” entity. User has entered some value(1234) in the “fax” field and went on to fill other fields. After few seconds(lets say 20 sec) form gets saved automatically in the background. Incase if user feels he entered some wrong value in “fax” field so he/she modified the field again.

Prior to UR12 or with Classic Forms: User saves the form manually. Even though user modifies the same field twice, field value gets saved to the database once(in one transaction). And the workflow which is registerd will fire once and completes it’s tasks.

with UR12 Process Driven Froms: As user modifies the same field twice(one before the auto save and one after the background save), field value gets saved to the database twice(in two transactions). And the workflow which is registerd will fire twice…..

Scenario2: Lets say I have registered a workflow or a plugin on “onChange” of fields called “fax” and “email” in “account” entity. User has entered some value(1234) in the “fax” field. After few seconds(lets say 20 sec) form gets saved automatically in the background. Then user modifies the “email” field. After few seconds form gets saved in the background

Prior to UR12 or with Classic Forms: User saves the form manually. workflow will be triggered only once.

with UR12 Process Driven Froms: As user modifies two fields (one before the auto save and one after the background save), two field values gets saved to the database in two different transactions. And the workflow which is registerd will fire twice…..

To verfiy that, I have registered a workflow on “fax” and “email” field. Added a step to attach notes with fax and email field vlaues:

Result after Scenario 1:

Workflow instances:

Created Notes:

Created Notes when fax got updated to 1234

Created Notes when fax got updated to 1234567

In the same manner, for the second scenario too workflow got triggered twice…

Is it the expected behavior??? or Is it a design glitch??? or something am I missing??? So, if we gonna use Process Driven forms then what should be the considerations for extending the entity behavior??

Fingers Crossed….!!! 🙂

Share me your thoughts…!!!

How – To Series 15: UR 12 – How to enable Process Driven Forms

Hi all,
The most feature rich release(Polaris) post CRM 2011 has already been out and excited to see the same applied on my CRM online instance. Following is the snapshot of CRM 2011 in Chrome Browser.CRM Online(Polaris) Landing Page:

Account Home Page Grid:

Account Form:

Few observations:

1. As expected, “Areas” in Left Navigation Pane doesn’t have icons.
2. “Resource Center” still exists as it should not(we will come to know when it will be removed)
3. In “Account” grid, “account” icon column has been removed.
4. Coming to Ribbon, disabled ribbons are greyed but still retaining their icon colours.
5. Tab text colour changed to light blue and size got decreased.
6. No divider line between header and body
7. New icons(refresh, arrow buttons etc..)
8. Significant control highlighting with border when it get focused
9. And the notable difference is in “Notes” Section:

Now, we can type notes text and upload an attachment at one go whereas earlier it used to be one after the other.

Overall at first glance you can find certain CSS changes. In order to find exact CSS changes I downloaded the SDK v5.0.13 for polaris & UR12 . However, the visual style guide doesn’t include the latest CSS changes. Is it a miss in the package??

Now, lets come to the main course…where are the Process driven UI for Account, Contact and Opportunity entities? As we heard it earlier that there will be a new form for each entity(Account, Contact and Opportunity)which will have same name as their entity schema name. However, in the above account form, you don’t see it having an option to select another form. As most of you might have already know that we need to explicitly enable this feature so as customer will have the flexibility to choose when they require this. Remember once this feature is enabled we cannot revert it.

To enable, navigate to “Settings->Administration->Product Updates and click on “Update” button

It will take few minutes to install the updates. Once it gets installed, you will see the following content:

Installation process actually involves in creating the new UI forms, a new entity called “Process Configuration”, appropriate assignment of privileges and all the required components for them.  However, the new UI forms won’t contain all the customization whichever we have done prior to UR12. So, we need to migrate them manually(First point in the above screenshot talks about that). As I am having a new CRM instance which doesn’t have any customizations, I am good to go and use the new UI forms as is. Again, you are not yet done. Click on the second link(Enable the new forms) to enable the new UI feature.

Refresh your page and you can see that “Resource Center” Area has been disappered.

Account Form(Process driven):

Contact Form(Process driven):

Opportunity Form(Process driven):

Getting a taste of Metro Style design app in CRM…???

There are lot more stuff of UR 12 to try out… Happy CRMing..!!! 🙂

Hope it helps..!!! 🙂

 

Post Sync Plugins not allowed for certain System entities?

Hi,
I was getting some errors when trying to associate some records on creation of “User” and “Team” entities. I have registered “Post – Sync” step for those plugins.Getting following error for “Post” “Sync” plugin on “User” creation:
Error: usersettings with Id Does not Exist.

 

Getting following error for “Post” “Sync” plugin on “Team” creation:
Error: Generic SQL Error.

Changing them from “Post – Sync” to “Post – ASync” resolved the issue. It looks like SQL Locks might be causing the issue. There may be few more System entities for which the same is applicable. There is no documentation available specifying for which System entities creation “Post – Sync” plugins are not allowed. So, next time if you get any of the above errors for any of the other entities then try to change it to “ASync” and see whether it resolves your issue.

Hope it helps..!!! 🙂

Hidden Security Role in MS CRM….!!!????

Hi,
     Recently I was trying to assign all the available Security Roles in a Business Unit to a particular User using following Code:

     private void AssignSecurityRoles(IOrganizationService service, Guid userId)  
     {  
       QueryExpression query = new QueryExpression  
       {  
         EntityName = "role",  
         ColumnSet = new ColumnSet("name")  
       };  
       EntityCollection roles = service.RetrieveMultiple(query);  
       EntityReferenceCollection entityRefCln = new EntityReferenceCollection();  
       foreach (Entity entity in roles.Entities)  
       {  
         entityRefCln.Add(entity.ToEntityReference());  
       }  
       service.Associate("systemuser", userId, new Relationship("systemuserroles_association"), entityRefCln);  
     }  

To my suprise, I received following error: “The Support User role cannot be assigned to a User”


After debugging the code, I found that there is one role called “Support User” security role present in the list of retrieved security roles. I never seen this role in the CRM UI so quickly went through the CRM UI app and to my surprise it is not available. However, it is present in the SQL Server… !!! Doesn’t it mean it’s a hidden role???? Not aware of the actual purpose of this role. As per SDK documentation, “A user who is a customer support engineer” is the description for the Security Role.

I added an additional conditional to avoid associating “Support User” security role for the time being. Anyone has an idea about the purpose this Security Role????