Colourful MSD View

color grid

Explanation:

  1. Create JavaScript library with below function code
  2.  Sample JavaScript Code
    function displayIconTooltip(rowData, userLCID) {
    
        var str = JSON.parse(rowData);
        var col_data = str.soft_fieldName_Value;
    
        var imgName = "";
        var tooltip = "{" + col_data + "}";
    
        switch (col_data) {
            case 1: //Fulfiled 
                imgName = "soft_Green";
                tooltip = "Fulfilled Completetly";
                $('span:contains("Fulfiled")').closest('tr').css('background-color', 'green');
                break;
            case 2: //Partial
                imgName = "soft_Yellow";
                tooltip = "Fulfilled Partialy";
                $('span:contains("Partial")').closest('tr').css('background-color', 'yellow');
                break;
            case 3: //Unfulfilled
                imgName = "No_colour";
                tooltip = "No fulfilled";
                $('span:contains("Unfulfilled")').closest('tr').css('background-color', 'white');
                break;
            case 4: // Cancelled 
                imgName = "soft_Red";
                tooltip = "Fulfilment Deactived/Cancelled";
                $('span:contains("Cancelled")').closest('tr').css('background-color', 'red');
                break;
    
            default:
                imgName = " ";
                tooltip = "N/A";
                break;
    
        }
        var resultarray = [imgName, tooltip];
        return resultarray;
    
    }
  3. then register that JavaScript on the view
  4.  Publish your changes  and hard refresh your browser
  5. … and done !!  🙂

Please note here is this will work only on Read Only View, not on the Editable View.

Thanks!

 

Call action with input & output parameters

Continue reading “Call action with input & output parameters”

How MS CRM identify new line in data

no-newline

one of requirement we had from client is add </br> for new line for “Description”, when we forward that data to another application from SOAP call.

But problem was, we cannot put that </br> in CRM field because its not looks good and many time user copy – pest data from some other document that time also we can not ask user to add ‘BR’  tag on each new line and even its not feasible.  Continue reading “How MS CRM identify new line in data”

Common plugin for Deactivate / Delete all associated entity

Its walk-through for deactivating all associated (1:N) records. Steps for that are

  1. Create plugin
  2. Register and create steps

Create plugin

Continue reading “Common plugin for Deactivate / Delete all associated entity”

MS CRM Plugin debugging

top-debugging-tips

To debug plugin, we have two ways, One is explained in below provided link, I will explain the other.

https://support.microsoft.com/en-us/kb/2778280

Continue reading “MS CRM Plugin debugging”

Fetch current record’s GUID/Name

Access GUID of opened current record on browser it self. We can do it by using a little bit of JavaScript.

  1. Open IE
  2. Press F12 to open Developer Tool
  3. Type JS in Developer Console
  4. Run JS
  5. Press F12 >> developer console >>

JavaScript to get GUID

var id =frames[0].Xrm.Page.data.entity.getId();

Continue reading “Fetch current record’s GUID/Name”

Sharing Records using a Workflow

We can not share records directly form out of box workflow, but by writing little code, its possible. That code with workflow is available on codeplex for free here are the links …

http://crm2011sharestep.codeplex.com/

http://crm2011workflowutils.codeplex.com/

In both of these plug-ins, an option to ‘share’ was produced as a step when creating your workflow. When the step is selected you are then able to select with whom (user or team) the record is to be shared with and what the default share permissions should be (e.g. read, write, delete). Similarly, you can have the step configured to remove all sharing or sharing with a specific user.

Add XRM Sign

https://github.com/BackToTheCrm/XrmSignature

Allows recording signature input via a web resource on a CRM form and storing the resulting image as an attachment to the record.

signaturepad