Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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
add comment

1 Answer

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:

http://developer.financialforce.com/customizations/salesforce-flow-tool/

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. –  user293 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
add comment

Your Answer

 
discard

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.