Monday, 15 December 2014

Show Loading Message during function execution or Javascript load in CRM Form.

Hey CRM Folks, Today I am going to share one very interesting task that most of CRM folks face while working in CRM and play with Javascript. Many times Customers complaint that Javascript validations are avoided because the user performs operations before JS are completely loaded.

How can I check for the Condition ?
How could i restrict user to enter anything on the CRM form while JS not get fully loaded.......

Most of the times situation occur where user asked to show some processing message during long function execution, if you are doing some processing or calling any webservice which is taking time to execute and you want to show loading messsage to user.

Javascript : 

By using below mentioned Javascript function you can show Loading Message to user and can restrict untill JS get completely loaded.

function showJSProcessingMessage() 
{
    var formdiv = document.getElementById('dummyDiv');
    formdiv.disabled = true;

    document.getElementById('tdAreas').parentElement.style.display = 'none';
    var newdiv = document.createElement('div');
    newdiv.setAttribute('id', 'msgDiv');
    //newdiv.valign = 'middle';
    newdiv.align = 'center';
    newdiv.marginBottom = '5000px';
    var divInnerHTML = "";
    divInnerHTML += "";
    divInnerHTML += "";
    divInnerHTML += "";
    divInnerHTML += "</br><img alt='' src='/_imgs/AdvFind/progress.gif' height='34px' width='34px'/></br>";
    divInnerHTML += "<b>Please wait while Script is Loading...</b>";
    divInnerHTML += "";


    divInnerHTML += "";
    newdiv.innerHTML = divInnerHTML;
    newdiv.style.color = '#001D72';
    newdiv.style.fontSize = '13px';
    newdiv.style.zIndex = '1010';
    newdiv.style.margin = '0 auto';
    newdiv.style.marginTop = '210px';
    newdiv.style.width = '270px';
    newdiv.style.height = '100px';
    newdiv.style.background = '#FFFFE4';
    newdiv.style.border = "thin solid #000000";

    //newdiv.style.width = getBrowserWidth()+'px';
    //newdiv.style.height = getBrowserHeight()+'px';
    newdiv.style.position = 'relative';
    document.body.insertBefore(newdiv, document.body.firstChild);
    document.getElementById('msgDiv').style.visibility = 'block';
   
    setTimeout(disableLoading, 10000); //use it to define ms for disable loading
    
}
function disableLoading() 
{
    if (document.readyState === "complete") 
    {
        document.getElementById('msgDiv').style.display = 'none';
        document.getElementById("tdAreas").parentElement.style.display = 'block';
        document.getElementById('dummyDiv').disabled = false;
    }

}

Use this script on form OnLoad event :

Loading Message will look like below :



Hope this will someone.....You can use it based upon your project requirement.

Enjoy and Keep Reading !!! \A/\S/

Thursday, 4 December 2014

Microsoft Dynamics CRM 2015 - Start From Here !!!

Especially for CRM beginners !!!!


Finally the Most awaited one Microsoft Dynamics CRM 2015 is here!!! 

Don’t miss out the new exciting changes and enhancements that are coming! Stay up to date by reading this Blog as I continue to bring you the most up to date blog posts, other training materials relating to its highly anticipated release.2015 is ready to be the best version of Dynamics to date and I can’t wait to SHARE it with you!

See below for additional resources, information and Training Material on the Microsoft Dynamics CRM 2015 release,

Don’t forget to check out the most popular Top 10 New Features of Dynamics CRM 2015 !!!
which i'll Share in my next post...Till then,
Here is some important Links from where you can start learning....


CRM 2015 Basics :
https://onedrive.live.com/redir?resid=E596E7F6E13A3700!682&authkey=!AOjYMdaT5Cm6qy8&ithint=file%2cpdf

Start Working with CRM 2015 :
https://onedrive.live.com/redir?resid=E596E7F6E13A3700!680&authkey=!AF-2LsYBcXZkTxQ&ithint=file%2cpdf

CRM 2015 Release Preview Guide :
https://onedrive.live.com/redir?resid=E596E7F6E13A3700!681&authkey=!AKXhJLfjzuVIM5k&ithint=file%2cpdf


In my next post you'll get-


  • CRM Setup and Administration
  • Information For Developers
  • Information For End Users
  • What's new for developers
  • Product catalog enhancements
  • Use hierarchical data
  • Apply hierarchical security models
  • Use calculated and rollup attributes created in Dynamics CRM
  • Write form scripts that interact with business process flows
  • Use field-level security with system entities
  • Create business rules instead of writing code
  • Add custom help content...And Much More


So Keep Reading ...Enjoy......!!! \A/\S/

Blogger Widgets