function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EMasterEMaster 

Questions about using Flows

I have started using 'Flows' for the first time and have some questions about it:

1) Showing more than 200 records in a Dynamic Record Choice
I am trying to create a 'Dynamic Record Choice' that lists all Countries that exist in the custom Country__c object. However since there are over 200 records in this table (and the limit that 'Dynamic Record Choices' display is 200), I was trying to do a workaround I found online, by creating separate, smaller 'Dynamic Record Choice' lists, and then merging them.

So I tried to create a 'Dynamic Record Choice' that had all the countries listed from A to J and then another from K to Z, however I cannot seem to add an filter logic to the 'Dynamic Record Choice' to return all Countries whose 'Name' starts with A or B or C,etc. http://screencast.com/t/lPXzcvXg.

Is there any way i can do this, or another approach you can suggest to get my 200+ countries in a picklist for the flow?

2) Setting field value not ID
For the same 'Dynamic Record Choice, i am storing the value of it's ID field. I then use it when i create the new Account (step 2 of the flow) - i actually use it twice in that 'Record Create' step http://screencast.com/t/ZQU5K6lfC.

When it is used to set the 'Country__c' field on the Account, it works as expected (as that field is a lookup). However, when i use it for the 'BillingCountry' field, i want it to set the value of the 'Name' of the Country record, not the ID. Is there any way to do this?

3) Exiting a Flow
After a Flow is finished, how do i get it to return to the new record it just created?

I have tried doing this by adding a hyperlink label on the Finish screen to go to https://eu1.salesforce.com/{!NewAccountID}, however when this is clicked, it just loads the page in a new browser window, and leaves the Finish screen of the Flow open.

4) Replacing the New Account button
Is there any way to replace the 'New' button that appears in the 'Recent Accounts' list, with a custom button that launches this Flow? http://screencast.com/t/ZyrNCq9fF I do not want uses to create New Accounts using the standard process; i only want them to use this Flow. 
Hugh Wheeler 46Hugh Wheeler 46
1) Showing more than 200 records in a Dynamic Record Choice

I did this recently and the way I did it was to:

1.  Create a question which asked for the first 3 letters of the country.  
2.  Stored it in a variable.
3.  Used the variable in the dynamic choice query to pull out countries startign with those letters.
4.  Then I had a question asking if they had found the value whch looped back to the original three letter question if they indicated they couldn't find it.
5. Otherwise I used the value they selected from the choice.

2) Setting field value not ID

Not sure I havent tried anythign similar.  I would imagine its possible.

3) Exiting a Flow

This one is hard without apex.  You cant get to the new record Id without apex.  you can send them back to the original id.  The hyperlink on the finish screen is the best bet. although I found it didn't finishe the flow as you never clicked finish and I have no idea what effect that would have.

4) Replacing the New Account button

The following link should help.  You want to include the standard controller as per some of the examples at the bottom of the screen, then you should be able to create a button that calls the VF page.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_flows_adding.htm