Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Java Script Common file error.

$
0
0

Hi Guys,

Thanks for the advance help.

In the following JavaScript I am getting the error that  "HIMBAP"

if (typeof(HIMBAP) == "undefined") {
    HIMBAP = {
        __namespace: true
    };
}

HIMBAP.CommonScripts= {
//Method to set default field value
SetDefaultValue(): function(fieldName,defaultValue)
{
    //Set value
    Xrm.Page.getAttribute(fieldName).setValue(defaultValue);
},

ValidateProposedDates: function(startDate, endDate)
{
      var startDateValue = Xrm.Page.getAttribute(startDate).getValue();
      var endDateValue = Xrm.Page.getAttribute(endDate).getValue();
      if (startDateValue > endDateValue)
     {
        alert("End Date Should be greater than Start Date")
        Xrm.Page.getAttribute(endDate).setValue(null);
        //Set focus on end date field
        Xrm.Page.getControl(endDate).setFocus();
      }
},
__namespace: true
};

Thanks and Regards

Vijil Jones.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>