Monday, November 19, 2007

Retreiving Link Entitiy attributes from CRM 3.0

We have 2 methods to retreive information from CRM.
  1. Using Fetch Statements
  2. Using QueryExpressions

although we can use to join entities in queryexpression we cannot use it to retreive link entity attributes. we need to use Fetch statements to do this task.

Also if we are trying to retreive more then one link entities attributes from a fetch statement we need to use alias, else the fecth statements will not be executed properly. below you can find an example.








Monday, September 24, 2007

Hiding links from the left pane of an entity

When we log in to CRM what we see is the application navigation area. This can be modified using site map xml file. but the tricky thing is when it comes to entity navigation pane we cannot use the site map. we have to use the ISV.Config file or use javascripts at the from onload event.

For a project that we are currently doing we have used javascripts to hide the unwanted links when the entity form is loading. The thing is the links are getting hidden after the form is getting loaded, hence the user is able to see some of the items when the form is loading. But as people say something is better then nothing. this was a blessing in disguise to us.

Please keep in mind you need to get the id's of the the links that you need to hide after they gets rendered to the page. you can open up a new form with this facility by clicking ctrl+N button and a new page will be opened of the form with the view source functionality.

i was abled to find this solution from microsoft.crm developer community. i cant remember the link. but would like to say "thanks guys for publishing the solution".

you can use the following javascript to hide the unwanted links.
var LeftBar = new Array() ;
LeftBar [0] = "navHistory";
LeftBar [1] = "navContacts";
LeftBar [2] = "navMoreAddresses";
for (i=0;i
{
try
{
document.getElementById(myLeftBar[i]).style.display='none';
}
catch(err)
{}
}

Hiding of Owner field froma crm form

We needed to hide the ownerid from a crm form. we tried using crmForm.all.ownerid.style.display ="none";

This was partially working as the fields look up button was hidden, but didn't hide the entire field.

Then we used
crmForm.all.ownerid_d.style.display ="none"; and it worked.

Also when tried to hide a tab we had to wait till it gets rendered and then take the id of the tab.

Tuesday, September 18, 2007

Quick Create form for custom entites

Recently in one of our projects we needed to the new button(so that user can create records from the look up easily) in the look up for a custom entity. This is not supported in CRM 3.0 for custom entites.

So i had to find another way to do this. I did what we do best for solutions in the net. Lucky for me i found a method in stunnware. although it's not what we wanted exactly i think we could live with that for now.

You can also find this article here.
http://www.stunnware.com/crm2/topic.aspx?id=js10

Thanks a lot Michael Höhne. You saved my day..

Wednesday, September 5, 2007

New CRM Virtual Machine

I recieved the downloaded version of the new CRM virtual machine from UK mother company yesturday. Since it was aroound 2.2 GB it was hard for us to download it. Hence i got a copy from the UK.

There are so many new things that are attached with the new virtul server.

Can't wait to go through it.

Customizing CRM Session

Today our company did a Microsoft Dynamics CRM 3.0 presentation to the sri lankan dotnet community. The presentation was conducted by myself and one of my collegues (and a team leader of our company) Lolitha.

We explained a bit about what is CRM, why use CRM and the benefites of using Microsoft CRM. then we moved on to customization of CRM. we did a basic intro and did some demo session regarding entity, form and view customizations.

Hope the presenation was good and the audience were able to understand what we spoke about.

Cheers to us.

Wednesday, August 22, 2007

CRM 3.0 Errors

Normally CRM 3.0 will be displaying "An Error has occured.Contact your system administrator" as the error message. A developer will not be happy with this error message as the exact cause of the error is not visisble to him.

There is a method to get the real deal displayed on the screen. But this should be done only in the developemnt enviornment as the users will not be happy with the exact error messgae they will be seeing.

To see the error message you need to make the developererorr variable in the web.config to On. you can find the web,cofig under the CRMweb folder.

Tuesday, August 21, 2007

Reports in CRM 3.0

When viwing reports in CRM users get so many issues. 2 common issues are
1. SQL reporting service has not been configured properly.
2. CRM web site is running under asp.net 2.0 version.

About CRM web site running under asp.net 2.0 is ok for the web forms, but for the SRS it has to be running under asp.net 1.1 version.

Microsoft Dynamics CRM 3.0 Virtual PC Demonstration - August 2007 Release

Microsoft has released a new virtual PC image of CRM. This is a 2.2 GB zip file. when extracted it will be around 7 GB.

The link to download this image is given below.

http://www.microsoft.com/downloads/details.aspx?FamilyID=57394bc8-5ecc-422e-a066-34189f48f8c8&displaylang=en

This image will get expiered on 11/30/2008.

Monday, August 20, 2007

Built in modifed and created on fields in CRM3.0

These field values gets updated automatically when we do a change to a record. but did you know when you display these fields on a form eventhough that these fields are date and time fields you can only is date part of the field.

Because of this issue i had to create a new field for modified on because my customers wanted to see the modified tme as well.

javascript Onchange event in CRM 3.0

today we had to change the value of a filed(Disabled) in a crm form when another field value was getting changed. we were able to do this firslty and when saved, the data got saved perfectly.

we were happy till we saw that when updated the disbaled field value was not changed eventhough we have actually changed the value by modifying the affected field.

after sone time we thought that since we are using javascripts the value is not getting passed to the server, because the server thinks that the value has not been changed.

So we used the followinf statement to check whether the value will be chnaged and what do you know, it worked perfectly.

crmForm.all.[fieldName].forceSubmit = true;

As i got to know this is very useful when it comes to disbaled fields. whether the field value has got chaned or not when saving the value of this field will be sent to the server.

Friday, August 10, 2007

Custom Look ups in CRM

I have put a post to this blog regarding the custom lookup. but there is a slight porblem in that.
if you create a new contact using the custom lookup the related filed will not be populated with the newly created contact.
The contact will be created and will be stored in the contact entity.
i am trying to find a workaround to this and will post it once i find it.

Sunday, August 5, 2007

Accessing Parent form information in a child form in CRM 3.0

In one fo my recent projects i needed to access parent from field to check a certain value in an child form. I Knew this is possible using client side java script and did a search in the web to find any help. I found a prefect link which states about this. It's from stunnware. You also can use this link when you want to access parent form. the link is given below.

http://www.stunnware.com/crm2/topic.aspx?id=JS6

also for more javascript functions with CRM check the above link..

Thursday, August 2, 2007

Custom Lookups in CRM 3.0

We need to create custom look ups in CRM 3.0 to make life easier for the people who enters the information.
imagine when you create a case first you have to select the company which the case reported and then select the contacts from that company who reported that case. it would be very easy for the data entry person when he/she selects the account only the contacts listed for that account wil be displayed. by default CRM doesn't support this. but you can use javascripts to do this.

You can use the following fecth statement for the onchange event of the account look up.

crmForm.all.new_reportedid.lookupbrowse = 1; // This turn on filter crmForm.all.new_reportedid.additionalparams = "fetchXml= "; crmForm.all.new_reportedid.additionalparams += "&selObjects=2&findValue=0";


crmForm.all.sa_customerid.DataValue[0].id = This should be the field name of the account id in your form.

selObjects=2 - referes to the object type code of the entity. Normally contact entity has the object type as 2.

crmForm.all.new_reportedid = This should be the field name of the contact look up.

selObjects variable specifies the object type code of the entity.

This is something that i had to do in one my projects using CRM 3.0. i was greately helped by the artical posted by Ronal Lemman. you can find his article at
http://ronaldlemmen.blogspot.com/2006/12/filter-data-in-crm-lookup-field.html

Microsoft CRM 3.0

Most of things i do at my work are related to this product. although most of the things can be done by an average person with some understanding there are also something s that needs to be done by someone with coding expertise. thats where we come in to play.

There are so many things that can be done using CRM 3.0. Most important thing is to keep all the customer related information under one product and handle their information properly. microsoft crm does this perfectly. this product gives the buyer full ownership of it, so they can do whatever they want to the product and there are many more features also.

you can find more information regarding this at
http://www.microsoft.com/dynamics/crm/default.mspx

Welcome

Thought of starting to blog regarding the things i do. I always wanted to do this. But have been caught up with work and some other stuff, hence never had a chance to start blogging. Better late then never. So i start bloggin now.

Cheers....

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...