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

Passing parameter from one field to another form for validation

$
0
0

Hi, I am new in CRM 2016 Online. I have problem which is how to pass parameter from one field to another form for validation purpose? 

function ValidateMinimumSalesPrice()
{
//Variable for amount
var salespriceValue = Xrm.Page.getAttribute("amount").getValue();

//Variable for Minimum Sales Price
var minValue = ExecutionContext.getEventSource().controls.get("new_minimumsalesprice").getAttribute().getValue();

//Check the value of amount
if (salespriceValue != null)
{
//Check the value of amount again Minimum Sales Price
if (salespriceValue <= minValue)
{
alert("The amount of sales price cannot less than minimum sales price.")
}
}
}

The logic is there, but when I test, it have an error 'getAttribute() null or undefined' 

Someone please help me to solve this problem.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images