Tuesday, March 22, 2011

How to get CRM grid View Id

If we add this piece of code to ISV.config we get the current View Id currently displayed in the CRM grid:

if (top.stage.crmGrid != null)
{
    var ViewID = top.stage.crmGrid.GetParameter('viewid');    

    alert(ViewID);
}

Train Tracking with GPS

Last Saturday I took a trip on a train from Riga to Saulkrasti (45km). Weather was pretty cloudy but I thought maybe I could get interesting info from this trip with my gps. This is my gps data report

Train model: ER2T

Friday, March 18, 2011

CRM Save Events - you can do more

    When user saves the form we can check which save event was executed and regarding to that event make some actions. Two most popular save events are Save and SaveAndClose.


Javascript functions to call from  your script:
crmForm.Save(); 
crmForm.SaveAndClose();


To check which event was executed  we use "event.Mode"
Output for Save event = 1;
Output for SaveAndClose event = 2;


example:   
if  (event.Mode == 1) {
alert("You click Save button");
} else if (event.Mode == 2) {
alert("You click SaveAndClose button");

Thursday, March 17, 2011

JavaScript in CRM ISV.config

Writing JavaScript code in ISV.config can be painful. There is one important thing you need to know when you write JS code in ISV - Some JavaScript characters here are not supported and that's why you need to encode them:

Symbol                 Encoded value
   <                       &lt;    
   >                       &gt;
   "                       &quot;
   &                       &amp;

Wednesday, March 16, 2011

Great site for CRM developers

If you are familiar with Russian language this is great site about CRM customization. If not.. there still are lot of scripts to pick up.
Мелкомягкий CRM