Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Address Composite Fields with JScript

$
0
0

I am trying to set address fields null on a crm form if another field value =1. The issue is that the fields on the form are the address composite fields and the script does not seem to be working with these fields.

function clearAddress() {
var clear = Xrm.Page.getAttribute("orbus_clear").getValue();

if (clear == 1) {
Xrm.Page.getAttribute("address1_composite_compositionLinkControl_address1_line1_d").setValue(null);
Xrm.Page.getAttribute("address1_composite_compositionLinkControl_address1_line2_d").setValue(null);
Xrm.Page.getAttribute("address1_composite_compositionLinkControl_address1_line3_d").setValue(null);
Xrm.Page.getAttribute("address1_composite_compositionLinkControl_address1_city_d").setValue(null);
Xrm.Page.getAttribute("address1_composite_compositionLinkControl_address1_stateorprovince_d").setValue(null);


}

}


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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