Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a flow does several actions:

  1. create a new Service contract with user input (start date, end date, name)
  2. create a new license key to send to end user
  3. change the opportunity to closed won.

I want to add opportunity products (only M&S items) into Service Contract line items. I'm not sure if it's possible to add multiple records via visual workflow...

Have anyone implemented something similar?

share|improve this question

I think you will have to implement a kind of loop, utlising Decision nodes to allow you to return to an entry screen.

Here is a good blog post that illustrates how to build an Expenses Journal (which has multiple expense line items) using such an approach:

share|improve this answer
Thanks for the post Phil, but I'm not sure how many opportunity line items I'm going to have (usually it's 2, but it can have cases of even more), so it can get a bit complicate to manage... What I did eventually is a trigger pulling the M&S line items upon SC creation. Do you know what's the best way to "Convert" a trigger to an apex plugin? – Itay B Dec 30 '12 at 9:42
@ItayB why don't you post another question "How to Implement Process.Plugin for use with Flow?" and post your code on there? I can't really answer satisfactorily in comments. – Phil Hawthorn Dec 30 '12 at 12:35
I will post another question, Just wondering prior to that if there's a easy way to do this with visual-workflow that doesn't requires code. thanks again. – Itay B Dec 30 '12 at 21:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.