For a certain aspect of functionality, I require the need to pull a value from a quick view form on an entity "Course request" form. The quick view form is of the "programme" entity and includes details on Member and Non-member price.
I need to retrieve the "member price" value and set a corresponding field on the parent form to this value. I have the below code to do this, however this does not seem to work.
Quick View Form is called: Course: Programme Details - Quick View
function getPrice(){
if (Xrm.Page.getControl('Course: Programme Details - Quick View_Course: Programme Details - Quick View_programme_MemberPrice') != null)
{
var priceQuickControl = Xrm.Page.getControl('Course: Programme Details - Quick View_Course: Programme Details - Quick View_programme_MemberPrice');
var price = priceQuickControl.getAttribute("memberprice").getValue();
//var newEmailfield = Xrm.Page.getAttribute("MemberPrice");
var priceCourseRequest = Xrm.Page.getAttribute("memberprice").setValue(price);
console.log(priceCourseRequest);
}
else{
return null;
}
}