Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 123975

Forum Post: RE: show hours for total cases/minutes in contract

$
0
0

Add the below method (with your custom field replacing "new_hoursfield") to the form onload and Total Cases/Minutes OnChange events.

function PopulateHours()

{

    try

    {

         var hours = Xrm.Page.getAttribute("totalallotments").getValue();

         if (hours==null) {

              Xrm.Page.getAttribute("new_hoursfield").setValue(0);

         }else{

              Xrm.Page.getAttribute("new_hoursfield").setValue(hours/60);

         }

    }catch(err){

         alert(err.message)

    }

}


Viewing all articles
Browse latest Browse all 123975

Trending Articles



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