views:

13

answers:

2

Issue is :

I have one system Entity called 'Order' and another custom entity 'X'. I am looking for some kind of same functionality as available on Quote called 'Convert into Order'. I want the same functionality on Order form that there will be some button on it and when i click on it, it will create instance of entity 'X' and not only this, it will also transfer all the mapping attributes of Order and 'X', on the 'X' form.

Can any one share his experience or step to implement this?

Many thanks.

A: 

You would have to use JavaScript and call CRM web services on click of new button.

So you don't have to map your attributes of your entities in JavaScript, you could use InitializeFromRequest to achieve same result. I have used this way to programmatically qualify/disqualify leads and convert them to contact, account and opportunities.

There is a nice sample code for this on CodePlex: http://www.codeproject.com/KB/cs/CRM_30___EntityMoniker.aspx

Please note, this code has a bug. Check Ronalds post for quick fix: http://ronaldlemmen.blogspot.com/2008/09/convert-lead-to-contact-account-andor.html

David Vidmar
A: 

Yuo could do this using an on demand triggered workflow. just create a workflow targting the order entity, have the first step create a new entity X by copying the valuses from the passed in order entity.

if you want the option to do this to show under the more actions menu instead of teh workflows one then you can edit the isv.config file.

Stuart