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

Validate FulFill Order Button

$
0
0

Hi,

I am very new to CRM 2011 and having difficulty finding some step by step resouces for custom code.

I would like to limit the use of the fulfill button on the order entity.

Disable the fulfill button only if total order value >= 1000 and current user (not owner) is not a member of team 'Accounts'

I have this so far but do not know how to write the appriopriate validation statement.

Hope someone can point me in the right direction.

Thanks in advance.

Alex

function FrmOnSave(prmContext) {
 var wod_SaveMode, wod_SaveEventVal;
 wod_SaveEventVal = 56;
 if (prmContext != null && prmContext.getEventArgs() != null) {
    wod_SaveMode = prmContext.getEventArgs().getSaveMode();

   if (wod_SaveMode == wod_SaveEventVal) {


 if ??????total_order_value >= 1000 {

            if ?????????current_user == member of Accounts Team {
 
                          //alert("Passed Validation");

              else
                 // alert("Failed Validation");
              prmContext.getEventArgs().preventDefault();
}
}
}
 }
}


Viewing all articles
Browse latest Browse all 82002

Trending Articles



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