Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

check if id already exists based in other form - Javascript CRM 4.0

$
0
0

Hi guys,

I'm a new javascript dev. and I don't know how to check (at OnSave) if a field equipment id on contract detail form already exists for a contractid. 

I've trying something like this:

var equipm = crmForm.all.wttl_baseinstaladaid.DataValue[0].id; //lookup field
var contract = crmForm.all.contractid.DataValue; 

if(contract, equipm)
{            
   alert('equipment id already exists for this contract');                    
   event.returnValue = false;           
   event.cancelBubble = true;             
   return false;
}

However, I know that this condition is based on a method. But i don't have code access. 
For this case, can i use fetchxml or just a trigger? 

Thanks.

Btw, sorry about the bad english.


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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