I think activeStage.getName should be activeStage.getName() ..... it might be your if statements are never true. Also, is the optionset only in your business process flow and not on the form? If so, this might help. var afield = Xrm.Page.getControl("header_process_new_status").getAttribute(); afield.setValue(1); See these posts ..... neilparkhurst.com/.../javascript-work-with-fields-in-header-and-business-process-flow neilparkhurst.com/.../javascript-add-code-on-business-process-flow-change-and-select neilparkhurst.com/.../business-process-flows-javascript-part-2 neilparkhurst.com/.../crm-business-processes-and-javascript
↧