Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

How to set the value of a field based on another field value

$
0
0

Hi,

First I new working with CRM 2011.

In the opportunity form there are 2 custom fields. the 1e is a option set and the 2e should be file in base on the value of field 1.

I have created a websource with the below value and set the OnChange on field 1. But I get a error message, can someone help me.

Thanks.

function Fasefield() {
 var proces = Xrm.Page.getAttribute("new_verkoopproces").getValue;
 var fase = Xrm.Page.getAttribute("new_fasepercentage");
 if proces == ('Prospect') { 
  Xrm.Page.getAttribute("new_fasepercentage").setValue('0');
 }
 else if proces == ('Appointment') {
  Xrm.Page.getAttribute("new_fasepercentage").setValue('10');
 }
 else if proces == ('Demonstration') {
  Xrm.Page.getAttribute("new_fasepercentage").setValue('15');
 }
 else if proces == ('Acceptation') {
  Xrm.Page.getAttribute("new_fasepercentage").setValue('50');
 }
 else if proces == ('Contracting') {
  Xrm.Page.getAttribute("new_fasepercentage").setValue('75');
 }
 else if proces == ('Ordering') {
  Xrm.Page.getAttribute("new_fasepercentage").setValue('100');
 }
}


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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