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
Saad Ahmad 33Saad Ahmad 33 

I need to create a dynamic picklist/formula setup - help!

This issue involves 4 objects.
  • Insertions and child object called Insertion Details (records)
  • Publisher Accounts
  • Specs
On the Insertion parent record - a user needs to identify a publisher account....

User-added image


On the Insertions Details Record the User Needs to Specify Actual Dimensions:

User-added image


What I'm looking to do is create a dynamic way so if the user selects from a picklist on the insertion child record any of the columns below (double truck actual, full page actual, junior page, etc as shown in screenshot below), then a second field will auto populate the specs data for that specific publisher and if there is no data referenceable then the user can input some value.

Is this possible?


User-added image

 
Sudha#aSudha#a
public class sample
{    
    public String ownership {get;set;}
      
    public sample()
    {
        
    }

    public List<SelectOption> getownershipOptions()    
    {    
        List<SelectOption> options =  new List<SelectOption>();    
        options.add(new selectOption('None','--- None ---'));    
        Schema.DescribeFieldResult fieldResult = Account.ownership.getDescribe();    
        List<Schema.picklistEntry> ple = fieldResult.getPicklistValues();    
        for(Schema.picklistEntry f:ple)    
        {    
            options.add(new selectOption(f.getLabel(),f.getValue()));                    
        }    
        return Options;    
    }      
}
 
Saad Ahmad 33Saad Ahmad 33
Thanks Sudha. I'm still new to programming in Salesforce - is this a sample code?