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

How to create condition statement based on two entities (Experts please chime in!!!)

$
0
0

All,

Please bear with me as this is just hypothetical for just demonstration purpose so that it's easier to understand what I'm trying to achieve.

Can someone tell me how to do this in CRM 2016 Online with JavaScript?

If a user purchases an Item that is $25 or more, then it's free shipping the entire order. It needs to check if any product purchased is $25 or more.

The trouble I am having is to reference a criteria on the SALESORDERDETAIL entity from the SALESORDER entity.

On the page load - I would load this javascript to check.

if(Xrm.Page.data.entity.attributes.get("new_salesitem")>25) //salesorderdetail

{

Xrm.Page.data.entity.attributes.get("new_shipstatus").setValue("Free"); //salesorder


}



Viewing all articles
Browse latest Browse all 46379

Trending Articles



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