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
Ben MorchBen Morch 

Custom object list view selections to create a Case

Hello All,

I want to be able to create a Case after selecting records from a list view on a custom object (Collections__c).  I have already tried a few things to get this done, but can't get all the way through it.  I wanted to see if the community had any suggestions on the best way to acheive this process.

Here is a break down of what is required for our process:
  • Be able to select 1 or more records from a list view on Collections__c
  • Open a VF page to select a Collection Issue (this is an object with 12 records in it) and apply it to a field in all of the selected Collections__c records
  • Create a Case
  • Apply the Case ID to the selected Collections__c records so that they show in the related list on the Case

Of course, as with any process there will be more happening inbetween, but that is the main logical process.  I was able to get the list of Collections__c records, open the VF page, and display a pick list of the Collection Issue records on the VF page.  I was not able to grab the selected Collection Issue, apply it to the Collections__c records, or create a Case.

To get the list of Collections__c from a list view I followed this site:
http://sfdcsrini.blogspot.com/2014/11/custom-salesforce-button-to-execute.html

The link example shows that after the records are selected it simply does an update to a single field on the records.  My purpose is to open a VF page that displays a picklist of Collection Issues (the Name from each record in that object) so that one can be chosen.  Because of this I called a Global class to get and display the Collection Issues.  This is about the point that i begin to have trouble getting things done as I *think* that they should happen.  The Collection Issues picklist displays on the VF page that opens from the same button as getting the list of Collections__c.  When I select one of the options in the picklist, I can't get the selection to be applied to the list<Collections__c> and create a new Case.  This, in turn, means that I can't apply the Case ID to the list<Collections__c> either.

Hoping that someone can give me some guidance on this one.