Hi, im a newbee on crm 2011's javascript. Just a quick question.
I have a custom entity which is Estimated Revenue in Opportunity. ( i don't use the OOTB) and a
Rating which is a Picklist.( contain "moderate", "very important")
so, my Rating's value is depending how much value that
Estimated Revenue input.
Eg : <=50000000 should be "moderate" in Rating.
My code is onSave in Form Properties.
my sample code as below, i didnt return any error in this code but it just didnt work :( please please help...i need any blog and advise from all the expertises out there :) thanks so much !
function getEstToRating() {
var EstAmount = Xrm.Page.data.entity.attributes.get("new_estrevenue");
var ratingtype = Xrm.Page.data.entity.attributes.get("opportunityratingcode");
var EstimatedAmountValue = EstAmount.getValue();
var ratingvalue = ratingtype.getValue();
if (EstimatedAmountValue<=50000000){
ratingtype.getValue==3;
}
}