14

The short answer is Yes, absolutely. You can pass variables using the standard HTTP URL parameters. So from the lead page you can have a link to launch a flow and pass the leadID as the following nax.salesforce.com/flow/myLeadFlow?vaLeadID={!ID} where vaLeadID is the unique name of the variable in flow. If you are using a Visualforce Page with a flow ...


14

Using a Wait (now called Pause) element does preserve the Flow's state, including all of its variables and the field values of queried sObjects, across the boundary into a new transaction. As expected, limits are reset across the transaction boundary. This strategy is more or less explicitly endorsed by the documentation: A transaction ends as soon as a ...


10

You can assign a fault connector and screen to any lookup or DML action. This should capture a validation rule...although I'm not sure if it will on update of a child causing a validation rule on the parent. All you need to do is create a screen with a text output that uses the merge field {!$Flow.FaultMessage}: Then connect the action element to the ...


7

I reckon isdtp=vw (the magic service console parameter) should do it.


7

Flow doesn't provide the standard way to add image, but there is a workaround to add image into Visual workflow. Add a Display Text to screen page and enter HTML markup to that text like regular HTML. Visual workflow render all text as html text. Ex: In above image html tag is added to Display text <img src="http://www.wolfgangdigital.com/wp-content/...


7

Flows currently have some pretty serious flaws, including having a very poor execution time (better chance of CPU governor limit exceptions), being harder to optimize (better chance of SOQL or DML governor limit exceptions), and a Flash-based editor that actually makes it faster to write trivial pages in Visualforce and Apex. However, Flows do not require ...


7

First of all, this is an excellent question and I am writing best as per my opinion which can vary with others. Considerations When to do what and what can be supported over other. Process builder works good in following scenarios. Create a record of any object type Update any related record—not just the record or its parent Use a quick action to ...


7

It's cleverly hidden in the section titled "Update Active Stages and Collections with New Assignment Operators" in the release notes. Basically, you can use an assignment formula to determine the size of your collection: {!myCollectionSize} equals count {!myCollection} And from there, you can then use that value in conditional controls, etc.


6

You can call an Apex plug-in from the flow: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_plugin_using.htm You could run this plug-in without sharing to allow the user to insert/update objects that they do not have access to. Write the plug-in to accept as input all parameters needed to perform the inserts and updates. Then in ...


6

Most of the objects that represent a Flow have key prefixes starting at 300 and going through to 31v. E.g. 300 InteractionDefinition 301 InteractionDefinitionVersion 308 InteractionCondition None of these currently (Spring 14 / v30.0) appear to be accessible via the Partner API, the tooling API, or directly in Apex. They don't appear in the sObjects ...


6

The (attempted) serialization of the not serializable component can be avoided by making the field transient: public with sharing class Sample3 { private transient Component.Flow.Interview flow; public Component.Flow.Interview getFlow() { return flow; } public Sample3() { flow = new Component.Flow.Interview(); flow....


6

You need to add the flow to a visualforce page and enable the page to work in Salesforce1. As long as you are ok with the limited layout possibilities of the screens, you can give flow a try.


6

To invoke a flow from a class and pass in values to the Flow's variables: Flow.Interview flow = new Flow.Interview.MyFlowApiName(new map<String,Object> {'vAccountId' => aId}); flow.start(); // after flow has executed, fetch values from Flow's variables // (assumes flow creates an Order ...


6

The system never optimizes triggers or flows of its own accord. You will need need to gather all the relevant ID values and then call the flow. However, you should be wary of using flows in bulk anyways, because they tend to consume a lot more CPU time than simply writing Apex Code. When you call a flow, it runs synchronously, as if you'd just called another ...


6

Static variables in Apex only retain their value through the course of a single transaction. Future methods by nature execute in a separate transaction, which means that your static variables are reset. You cannot use static variables to return a value from a future method to the synchronous code that called it.


6

Normally, Process Builder does do short-circuit evaluation on Boolean expressions, so this is an effective way to guard against null references. I tried to reduce this to a minimal example, and the issue appears to be that the ISPICKVAL() function is evaluated before Boolean short-circuiting. A Process Builder with this formula-based condition works ...


6

According to the documentation on Getting Flow Variables, you should call myFlow.getVariableValue: String accountId = (String)myFlow.getVariableValue('accountId');


5

You can embed Flows in Visualforce Pages as you said. This would allow you to upload files as part of a flow. The upload of the Attachment or Document would sit outside the flow in the VF Page, and the ParentID for the Attach/Document you could pull from the Record ID's out of the Flow via the Apex Controller. The Visualforce Pages Controller has access ...


5

In Visual Workflow: I was having the same problem and created a Constant called BlankDisplayLine and gave it the value <br></br> (i didn't put " around this to be clear that i didn't use "s in the value). Then, in the Display Text, i added {!BlankDisplayLine} to the text. That was the only way i could solve this (kind of stupid) problem.


5

You can customize the flow appearance by applying custom CSS styles: "Using a combination of flow attributes and CSS classes, you can customize the individual parts of a flow, such as the button location, button style, background, and the look and feel of the screen labels." See Customizing a Flow’s User Interface in the docs.


5

Right now there is no real way to test the controller. You would need an Apex API for Flow to do this, which I am told is something we are working on.


5

Site Guest User cannot own Task or Event activities, neither can Customer Community User, Customer Community Login User or Partner Community User. The only way for a non-Salesforce-licensed user to own a Task or Event is if they are a logged in Partner Community Login User. This is a restriction on the permission model itself and not something that can be ...


5

To create an instance of the class, you first need to get a StandardController. So your steps in the test will be: Create and insert a Task record. Create an instance of ApexPages.StandardController Create an instance of flowLSHTaskContExt Task testTask = new testTask(); //Add the fields required for a Task here insert testTask; ApexPages....


5

The line in the example code: public Flow.Interview.doubler myFlow {get; set;} needs to be modified with the unique name of your flow. doubler is the name of the flow which is used in the example. For instance if you created a flow called ModemTroubleShooting in your code you would reference it as: public Flow.Interview.ModemTroubleShooting myFlow {get; ...


5

Figured this out! Below is the flow trigger equivalent of the trigger creating a list and passing to the method...I've not found this documented anywhere so hope this helps other. In your flow first you need a SObject Variable (my example is{!LeadInputVar}) . The flow trigger will set the id of the record here. Then create a Collection (my example is {!...


5

Found it. When editing the screen and the Display Text field there is a little button that is a T with what looks like a selection box around it. Type the text you want (View the Opportunity here). Highlight it, and in one of the fields that showed up you can put in the url. Then you can put in the URL, something like https://na12.salesforce.com/{!...


5

Dude, I spent 2 weeks researching this. As of Spring 2015, the flow can accommodate both Date + Time values, but the user will have to enter each separately in different input fields and your flow will need convert to a datetime value using DATETIMEVALUE() in a formula. Details below... One thing I encourage you to watch out for is the time conversion. ...


5

The simple answer is the flow variable names are case sensitive. When you use the Visual Flow editor to reference variables that you've created, the editor panels and dialogs will ensure you choose from existing variables and hence however you named your variables will be used in references to them. But when you are communicating from outside the flow ...


5

You DO NOT want to be calling a flow 200 times from within a for loop in a trigger in the case that 200 Manager_Contact_Relationship__c records are deleted at once. Assuming your flow does any data retrieval (essentially SOQL queries) or saves any data to the database (DML statements), you have committed a cardinal sin against Apex best practices by putting ...


5

Create a List View Custom button and use this code to pass parameters to the flow. Flow parameters: vSelectedCaseIds which contains case ids collection which can be found from {!GETRECORDIDS($ObjectType.Case)}. vCaseCount which contains number of selected case id count. retURL where it will be landed after completion. {!RequireScript("/soap/...


Only top voted, non community-wiki answers of a minimum length are eligible