locked
Convert Custom Activity to Opportunity RRS feed

  • Question

  • Hi,

    I have modified the 'Letter' activity to a custom activity. Need to populate custom attributes from activity screen to the opportunity screen when 'convert to opportunity' is selected.

    My approach: Write a plug in that will execute when the opportunity is created. The plug in must loop through the activities in this opportunity that just got created. It has to check if the activity is of type 'letter' and populate the 'letter' attributes to the 'opportunity' attribute. I am stuck in this stage: how do I find the activity which exists in the opportunity's history using the plug in.
    Tuesday, May 26, 2009 11:40 PM

Answers

  • Another solution that may be easier (defining "easier" as meaning using application based customization rather than custom code).

    Create a workflow against the letter entity.  Set the workflow to run on demand.  Add a step to create a record, and select opportunity.

    Then you can edit the opportunity form and map all of the activity fields to the opportunity record.

    Then, instead of using the convert activity button, just select your workflow from the workflow button on the top of the activity.
    Sunday, May 31, 2009 12:34 AM
    Moderator