locked
CRM 2011 Date controls with Time RRS feed

  • Question

  • Hi

     I have to checking the policyend date and Currentdate(system date)

     while comparing time is not at all equal , please chk my function how to remove the time frm  value

    /********************************************************************
     Policy startCheck date
    /********************************************************************/
    function CheckProposalDate(ExecutionObj)
    {
    //debugger;
           if (Xrm.Page.data.entity.attributes.get('abc_proposaldate').getValue() != null)
             {
                     var Proposaldate = Xrm.Page.data.entity.attributes.get('abc_proposaldate').getValue();
                       var Proposalstartdate= Xrm.Page.data.entity.attributes.get('abc_policystartdate').getValue();
                       if( Proposaldate >= Proposalstartdate)
                        {
                              alert("Proposal start date must be greater than or equal to the proposal date");
                              //return false;
                              if(ExecutionObj.getEventArgs() != null)
                                  {
                                      ExecutionObj.getEventArgs().preventDefault();
                                  }
                        }
              }
    }

     


    Rammohan

    Friday, May 18, 2012 10:12 AM

Answers

All replies