Friday, March 26, 2010

Populate CRM Fields from Parent Window

There are a number of people who have posted about copying a record via JScript button in CRM, and this post isn't far off from that concept. My coworker found a great way to implement the concept of opening a record and populating fields on the newly opened window, based on data from the originating window. And that is quickly opening an activity.

This customization cuts down the number of clicks to open a new Activity from 4, down to 1. 4 being click on the record you wish to create an activity for, click "Activities", click "New", click the activity type, click Ok. You can double click on the activity type to open it, but that's still 4 clicks technically. With this customization, users just click the button of the activity type. Done.

In a piece of software where users already feel like there are a lot of clicks and windows, this helps significantly.

Ok, now the good part. How do we do it?

Add a button to the entity you want to apply this customization to within the ISV.config file (in this example I use the contact):

<Entity name="contact" >
<ToolBar ValidForCreate="0" ValidForUpdate="1">
<Button Icon="/_imgs/ico_16_142.gif"
JavaScript="window.open('http://crmserver/CompanyName/activities/appointment/edit.aspx?');" PassParams="1"
WinParams="" WinMode="0">
<Titles>
<Title LCID="1033" Text="New Activity" />
</Titles>
<ToolTips>
<ToolTip LCID="1033" Text="Create new appointment activity" />
</ToolTips>
</Button>
</ToolBar>
</Entity>

Now, on the OnLoad script of the given activity (in this case the Appointment), add the following code:

//appointment onload script
if (window.opener.crmForm) {
var rgid = window.opener.crmForm.ObjectId;
var rgtype = window.opener.crmForm.ObjectTypeCode;
}
if (rgtype == 1) {
var rgname = window.opener.crmForm.all.name.DataValue;
}
if (rgtype == 2) {
var rgname = window.opener.crmForm.all.fullname.DataValue;
}

if (rgid != null) {
var oItems = new Array();
oItems[0] = new LookupControlItem(rgid, rgtype, rgname);

crmForm.all.regardingobjectid.DataValue = oItems;
}


Done. Not too difficult and end users will love it.

David Fronk
Dynamic Methods Inc.

Friday, March 05, 2010

Integrations: In-line versus Queue/Batch Based

I love web services. They make it so that one system can send and receive data from some completely different system from anywhere over the web. Data gets updated, end users can see the latest and greatest data essentially instantaneously. With CRM plugins you can have in-line integrations that just push data from CRM to whatever system you want on a save, reassignment, deletion, etc. Or, you could pull data from another system whenever a page loaded, all through plugins. That's awesome.

Queue, or batch, integrations take note of everything that changes and then runs a process at a given time interval and pushes all of the data that has been queued up into the other system. Web services can be used to push/pull data in this data from the queue in batch fashion and keep systems in sync. But typically when these batches are run they put a load on the server and could be rather resource intensive. And data isn't updated instaneously, it gets updated shortly after the predetermined time interval. If this is nightly that might be too stale for some people. Depending on the data though, that may be more than sufficient.

However, when those web services don't work (when either server goes down, gets overloaded, etc) it's REALLY bad. Things either get out of sync, or else your integration just got a whole new level of complexity; waiting, or holding the data, until the other system comes back online. In the debate of in-line versus queue based integrations, queue based gets a point here. If the server is down, the queue based system gracefully errors, noting that the remote server is down, and the next time it runs it picks up where it left off and tries again. In-line dies and doesn't get the data transimitted across. The best it can do is error and put its data into a record to get queued up and processed at a later time...via a queue based integration.

I have recently worked with a system that went down at least twice a day. Originally it was thought that an in-line integration would work just fine. But since the receiving server has been down I now have to include or move to a queue based integration in case the in-line goes down.

Each has their use, and I want the in-line to work because in my mind it's the best. But in reality, the queue based, though "slower", is the most reliable.

If any one has any thoughts or input, we'd love to hear it.

David Fronk
Dynamic Methods Inc.

Friday, February 12, 2010

Pictures inside CRM Emails

One of my biggest issues with CRM emails, versus an Outlook email, is how difficult it can be to tailor up your emails that you want to send out. Getting a good looking email sent out of CRM is about as complex as writing a static web page. And since CRM emails are rendered in HTML, that's actually exactly what it takes to get a good looking email out.

Now, not everyone wants to send out an amazing document all the time, sometimes a picture or logo at the end of the email would suffice. Theoretically this would be simple, only CRM doesn't let you copy and paste images from your local machine into an email.

But there is a solution, it doesn't require too much effort, but it does require whatever image you want to be sent in your email to be public available to anyone. Just like a webpage cannot show an image from your local machine (unless it's hosted there) a CRM email cannot show an image that you copy from your local machine into the body of the email.

Here's how to work around this. You need to use pictures/logos that are publicly available. For instance, if you want to put your company logo in an email, go to your company web page, right click on the company logo and choose to copy the image. Then go to your CRM email and paste it in. The image will appear and when you send it out the image will carry through. The reason it will go through is because the reference you copy and paste points to a URL that all computers can reference and see.

If you can have a public folder that you store you images in and that can be accessed via a URL path from anywhere, then you are all set to put whatever images you want into your CRM emails. All this would take would be to add a folder to where your company website resides (maybe call it "CRMPictures") then you can manually browse to that location and copy and paste whatever pictures you want.

A little cludge of a work around but it works and it could give you a centralized place to place pictures/images to be used for your CRM Marketing needs.

David Fronk
Dynamic Methods Inc.

Friday, January 22, 2010

Teams in CRM

I've been asked a handful of times what Teams are in CRM and when it would be appropriate to use them. I couldn't find all that much documentation around when a Team should be used, just how to set up and reference Teams. So, this is my take on the usefulness of Teams.

According to the CRM Help files, teams are "a group of users who share and collaborate on business records. A team can consist of members who all report to one business unit or members who report to different business units".

In essence teams are an easy way to share records. And sharing within CRM are ways to make exceptions to security roles. Security roles limit what users can and cannot do within or outside of their business unit. However, sharing creates exceptions by allowing specific privileges to specific records.

As an example, two sales reps cannot see each other's contacts within CRM. But for a joint deal that they are working on one rep may need to see some of the other rep's contacts in order help get the deal closed. The necessary records are then shared and the deal can advance more efficiently as both reps can now use the necessary data to get their jobs done.

Teams are groups of users that can have records shared with them, to facilitate sharing records in mass with groups of people. That is the primary role of Teams within CRM. Please note that Teams cannot be deleted in CRM (why I don't know, that's just what they chose to do when they programed the system) and in order to "deactivate" them you need only to remove all of the members from the Team.

Teams may also be used when setting up "Resources" for a given "Service", within the Scheduling Calendar. There may be a repair team that makes up people qualified to repair bikes. By adding users to that Team, the Users are seen as available Resources through the Team to perform a given Service. Depending on availability and other Resources, the Scheduling Calendar can then find available times for repairs to be made by certain individuals. A very powerful tool, but also a lot of set up and a lot of linking that has to be understood to make it all work.

David Fronk
Dynamic Methods Inc.

Monday, November 23, 2009

Alternative Option to Disabled Field

Disabling fields has been a great way to lock down information within MSCRM. The one issue that I run into with it is that users comment that a disabled field is so "washed out" that it becomes difficult to read.

Another option to use instead of the out of the box disabled, is to make the field read only. It's a very simple script:

crmForm.all.fieldname.readOnly = true;

It leaves the field looking like other fields so that it's not washed out but it cannot be edited from the form. This customization is technically unsupported, but it has been around since the MSCRM 3.0 days and so far Microsoft hasn't locked this script down. We'll find out next version whether or not the script gets carried over or not. But worst case scenario for your scripts would be that they need to be modified to use the disabled option rather than the read only option.

David Fronk
Dynamic Methods Inc.

Friday, November 13, 2009

Easy Emailing from a CRM Contact Record

Has anyone else wanted to be able to click on the email address on a form in CRM and have it email that person/record? Or at least bring up an email message form that can be filled out and sent?



Yes, on the Contact form there is the "Send Email" button, but that sends a CRM email and personally, I'm not a huge fan. They're great for templates but other than that I very much prefer the Outlook experience of emailing.



So, the other day I came up with a good way to get the functionality that I really wanted. I used some script from one of my coworkers that turns the label of a field to a button and then modified the onclick action. Here's what the buttons look like:


And when anyone clicks on the buttons it will take the corresponding email address and use your default mail client (most likely Outlook) and open up an email message for you:


This is all done with script and with only a little fiddling the form is now so much more functional now. And for all you coders out there, here's the part you want, the code:

/********Email Button Creation********/
// Replace the attribute new_button with the button and create a link to the onclick function

function CreateEmailButton() {
var fieldTable = crmForm.all.emailaddress1_c;
var html = "<input onclick='Email_Button_OnClick()' value='Primary' type='button'>";
fieldTable.innerHTML = html;
}
// Function to be triggered onClick
Email_Button_OnClick = function()
{
window.location = "mailto:" + crmForm.all.emailaddress1.DataValue;
}
CreateEmailButton();


It's the little things in life that make us happy, so why not make your CRM users happy by adding some simple solutions to make their jobs easier? I don't necessarily mean this solution, but anything that makes it so that people don't have to do the same function 50 times a day sure brings a big smile to their face :).
David Fronk
Dynamic Methods Inc.

Friday, November 06, 2009

Why should I care whether my data is in a database or not?

This may sound like an obvious question but amazingly enough there are a lot of people who don't always quite get this. When asked how people manage their data and they tell me that they look up their lists in Word, I cringe. Or when people use Excel for all of the note taking needs and then ask for it to me imported into CRM I question the usefulness of such an exercise. Word is great for writing documents and letters. Excel is a mini database and monster of a calculation and reporting tool. CRM, from a data perspective, is a relational database that can track just about anything and relate one set of data to another set.

While I've only seen a handful of people using Word to track data, Excel is used all of the time. And amazingly enough people use Excel like Word. Putting an address of street1 street2 city state zip all in one cell isn't the best use of a cell. Breaking that out into separate data fields, or their own Excel cells makes it so that you sort, query, and group data together. That's the power of relational databases like CRM. With data being broken out and related properly data is able to be queried, grouped, sorted, quantified, calculated, and more properly analyzed. There aren't many limits on what you can do as long as your data is entered and records linked correctly between tables.

There is a huge difference between a CRM system with bad data and a CRM system with good data. One can actually effectively help users to target the proper places to focus their time and the other just misleads and frustrates people.

How do you store your data? Are you tracking everything that is of use to you?

David Fronk
Dynamic Methods Inc.