Theory
G2 support API(web service). We can call these API to use the workflow engine of G2.
Then, MSCRM is customizable by Javascript. So, I used Javascript to call API of G2.
Implement
1) Code the Javascript
Define a Function to call API of G2
Get data from the entity of MSCRM and save to variable
Spell a XML by entity data
Call the API of G2 by the URL of G2 and the XML
Save the Javascript file.
2) Customize the MSCRM
Open a Form(Example is a form of Quote)
Choose the customize tab
Click the “Form” Button
Click the “Form Properties” Button
In the “Form Properties” page, click add to add a web resource
Input a name and choose the Jscript type, click the “Text Editor” button
Copy the code of Javascript to the page and save.
Assign the event handler for the form
Publish the Customization