new_approval is Option set Field or Tow Option plz verify it yourself if this code gave error one of the reason would be the field is not Optionset it is Tow option bit field and this return true/false. to check you can alert the approval value. function ChangeStg() { var approval = Xrm.Page.getAttribute("new_approval").getValue(); alert(approval); if(approval == false) { Xrm.Page.data.process.movePrevious(function (result) { alert(result); }); } }
↧