Advertisements

Error with Xrm.Page.context.getServerUrl() in CRM 2015

Recently we have upgraded our client environment to CRM 2015 and our first observation after upgrade was that none of SDK calls through the custom javascript methods was working. After debugging, we found that there was some common function to get the server url and it was getting it through Xrm.Page.context.getServerUrl().

Although getServerUrl() was already deprecated in CRM 2013 but still it used to work when upgraded from CRM 2011 to 2013. Now it seems to have been excluded from the API list only and hence you would get undefined error if your existing code is using the same. Please check for the list of method it is showing up in the chrome debugger in the Xrm.Page.context namespace, in the below screenshot. You would find that the getServerUrl() method is missing.

image

changing the code to use Xrm.Page.context.getClientUrl() would work.

 

Hope this helps!

Advertisements

CRM 2013 SP1 Duplicate Detection Bug – Really a bug or expected framework behavior?

As many of us know, with CRM 2013 SP1, duplicate detection is back. Personally I liked it a lot because you can avoid potential duplicates just through configuration without writing plugins and also you get an option to continue with the duplicate record or to perform actions like merge on the duplicate records,

So came the requirement – “There should not be two records with the same field value in the same business unit” . So simple isn’t it. Happily i went ahead and suggested to apply OOB duplicate detection rules for this requirement. But my happiness was short lived. Lets us see why.

I have created a custom entity called ‘DupDetect’ for this demo. There is field called ‘Dup Field’ in this entity. To put the above requirement for this demo, there should not be two records with the same value of ‘Dup Field’ in the same business unit. So i went ahead and created the following duplicate detection rule and published it.

image

Now i move to entity and as you can see in the screenshot below, there is one record of DupDetect Entity with Dup Field value of ‘Dup 1’ owned by me.

image

Now i create one more record with the same ‘Dup 1’ in Dup Field and strangely the system does not show up any duplicates warning. As you can see below, there are two records with the same value for Dup Field and with me as the owner.

image

Well fine. duplicate detection did not work during create. I then thought of checking for update. I tried to change both the values for Dup Field to “Dup 2”. And voila now it shows a duplicate.

image

So I am not sure whether this is bug or not. My understanding is that during create when the duplicate detection is fired from the framework, the owningbusinessunit of the userid is still not deduced because owningbusinessunit of the record is deduced from the owner of the record. Hence did not show the duplicate detection pop-up. This is just my assumption and I would have to like your ideas on this.

 

Thanks for reading!

Workflow Enhancements in CRM 2013 SP1

With CRM 2013 SP1 release, everybody is talking a lot regarding the new service module enhancements like Case Hierarchies, Entitlements, SLA’s to name a few. Along with these fantastic features also came some new improvements in the workflow designer which can help a lot developing workflows. That is the Workflow Conditions where we can now use “AND” and “OR” groups similar to ADVANCED FIND. Just another day when i was talking to some other consultant about this feature, he felt a bit surprised and asked me back – “Dude, how did i miss it?”.

Many of you must already be knowing this, however still sharing in case some one finds it useful.

So let’s see. I created a new workflow on opportunity and say I want to write a check condition step. Prior to SP1 release,as soon i click to configure the check condition step, I can see the below workflow designer.

image

If you see the above, the two conditions shown here will always be in “AND” group. If you want an OR grouping you would have to write totally new check conditions. Developers working extensively on workflows must have faced this for sure.

However with 2013 SP1 release, you can now group the conditions using AND and OR groups. Check the screenshot below.

image

 

Hope this helps!

Configure Quick create form to launch directly from sub-grid when New button click instead of the lookup view – CRM 2013

While delivering trainings in Microsoft Dynamics CRM, frequently  i keep getting the question – “When Quick create has been enabled for an entity and when the ‘+’ sign of the entity sub-grid is clicked, sometimes CRM throws a lookup and sometimes it opens directly the Quick Create form”. What causes this behavior?

The answer is simple. If we remember the CRM 2011 sub-grid feature, there used to be command buttons for ‘Add New’ & ‘Add Existing’ which has been replaced with the single ‘+’ button in the sub-grid. So by default when you click the ‘+’ icon, CRM would show you a lookup with list of 10 maximum existing records and + icon at the bottom of it to add the new record. Please check the screenshot below. As soon we click the New Button the Quick create form would be launched.

image

 

Is there is any way we can launch the quick create directly and avoid this double click to launch the quick create form? Yes there is and it can be achieved in two ways

  1. Make the lookup of the parent as “Business Required” in the child form. Here the lookup for the account in the custom entity has to be made mandatory. Now when the “+” button is clicked in the sub-grid of the Custom entity the Quick create form would launch directly.
  2. Another way to launch the Quick Create directly is to remove the ‘Add Existing’ from the sub-grid menu using the Ribbon Workbench tool.

Off-course both these ways has disadvantages and might not suit your business requirements. For e.g –  making the parent lookup field mandatory would necessarily mean that there cannot be any orphan child entity. In case you have business justifications to implement any of the above two, you can go ahead with anyone of the above to give a better experience to the end-users.

Hope this helps!

Building 360 customer relationships

My blog normally contains ticks & trips about Microsoft Dynamics CRM. But this time i could not stop penning down an experience of my very good friend who has been in the field of consulting for quite some time. We meet after very long time and this particular project experience that he shared touched my heart. So decided to share it through my blog in case someone finds it useful.

As a Microsoft Dynamics CRM consultant, many of you must have already been associated with a project where your client management has decided to move their existing CRM system to Microsoft Dynamics CRM. And so here was my friend in another client location to implement MSCRM. The client was already running its business on some other CRM system and the management has decided to move from existing CRM system to MSCRM.

So they had all the requirements chalked out, tasks broken, iterations decided. My friend was supposed to sit with the client’s IT team and implement the modules with their co-operation. Everything seemed great.On the first day when he was introduced to their IT team, everyone in the room welcomed him with a big smile. Month in the job and he could sense an air of tension in the atmosphere. Somehow he could not attach himself self to the team and vice-versa. Every time he approached for any discussions or confusions, he could not feel great about the interactions that he normally had during my other engagements with other clients. Rather than pondering and making guesses about the possible reasons, he decided to talk it out. There was this senior programmer in their IT Team, very dedicated, experienced sitting just behind his cubicle. Hesitantly he walked up to him and asked – “Can we talk over a coffee?”. With a big smile he returned – “Sure. My pleasure.”

So they went out to the break-out area and started chatting, discussing about our family and stuff. And then without further beating around the bush, my friend came straight to the point and explained to him that only with collaboration between client and consultant team, they can deliver successfully a complex project like the one they were having. And also the fact that all this time he  haven’t been able to strike chord and work as a team towards achieving a common goal. He explained to him how eager he was to deliver this project successfully and how much this means to him and he wanted to understand whether he was missing something from his part.

Although initially hesitant, after gradual interactions the senior guy finally spoke up. He explained that the company’s decision to shift from existing CRM system was a sudden one and their team was not prepared to take it up. Hence business decided for external consultants to implement the same. Also  my friend could realize from what he told that there are so many developers/ consultants who have passionately worked with the technology for so many years. And now all of a sudden business is asking them to shift to a new technology altogether. My friend could realize that many of them were also in fear of losing their job once MSCRM system rolls out.

You might say that change is the only constant in this world and yet we can’t deny the fact the as humans we have a tendency to be in our comfort zone in every sphere of our life. And all this has made my friend an adversary rather than a productive member of the client team. All that happened till now started seeming logical to him.

So he decided to stay in course of his task but he took a slightly different approach. He started interacting proactively with the client team members whenever he got a chance, to break the ice a bit. He initially took up 2-3 members, started interacting with them heavily and while understanding their existing CRM system, he would note down their strengths and likeness and whenever he got a chance he opened up MSCRM to show them how the same thing can be achieved with the new technology without much difficulty. Every now and then he would take a very small requirement and draw an analogy to compare how similar their existing system is to MSCRM. In short he wanted to instill in them the idea that migrating from what they were doing to what they would be doing isn’t going to be that difficult.

Thankfully by GOD’s grace, his efforts started showing up. Those 2-3 team members started sharing their experiences with other team members. It worked like word of mouth or ‘zero dollar’ marketing for him. Now instead of he going over to their desk, they started coming over to him sharing their ideas, asking questions and explaining him about their existing system.

As my friend ended, I asked him if the project was delivered successfully? He replied with a big and long YES and till this time he agrees that without the client’s IT Team help, it would not have been possible. And yes that zero dollar marketing helped his company bag another project from the same client.

Thought of sharing my friend’s experience because personally I have seen many times while implementing big projects, we kind of overlook this situations. Management level decisions helps us in making a deal but many a times those decisions does not go well down the levels in the client company. Many might argue that it’s a problem with the client’s management and I can’t agree more. But as per my friend if he would not have tried to pacify the situation like he did there, he would not have been able to deliver the project like he did which would have been damaging for both the client and my friend’s company. And moreover with that result, the repeat business from the client would have been a distant dream.

So who is our customer? Is it only the Management who might have decided to engage us or is it the client’s entire employee tree from top to the roots who is in someway associated with it. Well i believe in the latter. I do not recommend my friend’s experience as a winning formula but it might certainly help you in these kind of situations. As my friend quoted by twisting a famous saying – “Don’t make a sale but make happy customer family.”

Till then you read one more of my blog posts, happy consulting 🙂

CRM 2015 New features

By now many of you might be already aware of this. However i came across this POWER OBJECTS blog and it seemed to be a very good quick overview of the new CRM 2015 features that are about to come soon. Want just an overview without a great deep dive into each topic? Well this is the link for you.

Hence sharing in case someone finds this useful.

https://www.powerobjects.com/blog/2014/09/16/top-10-new-features-dynamics-crm-2015/

Hope this helps!

CRM 2013 WORKFLOW BUG – This workflow cannot be created, updated or published because it was created outside the Microsoft Dynamics CRM Web application

Recently in my project, I encountered this error while importing one of the workflows from DEV. to QA. Environment When we tried to publish the workflow in the QA environment we got the following error.

This workflow cannot be created, updated or published because it was created outside the Microsoft Dynamics CRM Web application. Your organization does not allow this type of workflow.

Strangely enough the entire workflow was built in dev. using the Workflow designer in CRM and it was not custom XAMl based workflow.So we started checking for all the steps of the workflow and we found that the error is in the workflow is because of Send-email step.

On further investigating the fact we found that the error is because we were using Queues as the sender and the error was because of the Queue Guid. We just selected the queue manually in the QA environment in the FROM of the e-mail and then everything worked fine.

Off-course you can get this error for other reasons. However this can be one of the reason for getting this error.

Hope this helps!