Working with ribbon buttons and calling wrokflow in buttons.

 

  • create approve & Reject ribbon buttons, once click on approve it should change the status field to approve. if clicked on reject it should change to Reject. Based on status field change trigger workflow to send a email to stating request is approved/Rejected.


  • Fists create the solution, add the employ entity to the solution with metadata. 

  •  

  • Open the Xrm toolbox and open the ribbon workbench. 

  •  

  • Upload the solution with metadata what we created before. 

  •  

  • Select the form level ribbon bar and add the approve and rejected buttons in the required place. 

  •  

  •  

  • Prepare the workflow with send mail and activate the workflow. 

  •  

  • By using Data verse rest builder selects the execute workflow and triggers the created workflow to on the entity. 

  •  

  • Add the buttons to the form and rename the button as approve and add the images and description to the button. 

  •  

  •  

  • Create Web resource and add the above code and publish the resource. 

  • Go to ribbon workbench and in command add the JavaScript action and call the resource and function name in the command. 

 

  • After adding the enable rule and click on add rule and select the rule as value rule. 

  •  

  •  

  • In value rule mention the filed name and for which case button to be displayed. 

  •  

Button In the form 

 

Approve function 

 

Reject function 


 

 

 

Comments

Popular posts from this blog

create HTML page show all contact related to specific account, add this webresource as a subgrid in the form

Connect MS Crm To Postman For Webapi Calls.

create one PCF control and embed into crm