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
S PraveenS Praveen 

Assigning default values in the picklist

Hi

 

I have a requirement like there is an object 'A' and object 'B' those having same picklist suppose say p1 and p2.

 

there is a lookup of object 'B' in object 'A', when user selects some value in the lookup then those picklist values of object 'B' should get populated in Object 'A' 

 

Please help me out its very urgent

 

 

Regards,

Praveen.

Shashikant SharmaShashikant Sharma

If you are using native page layouts for object2 then it is not possible, if you are using custom VFP then it is possible. Please provide me whether you areusing custom VFP or not?

S PraveenS Praveen

Hi,

 

Thanks for your help.

 

i am using standard page for that, so for standard page how can we get the default values in the above senario. 

 

 

Regards,

Praveen S

Ankit AroraAnkit Arora

I hope we can do this by using trigger.

 

 

Thanks
Ankit Arora

 

Shashikant SharmaShashikant Sharma

No we can not get this from trigger as Trigger will only execute after any dml event like insert or update, but here the issue is to prefill a picklist according to another picklist before any insert or update. Using custom VFP looks only option to me.. 

Ankit AroraAnkit Arora

If we are talking about : As soon as the value in lookup is selected picklist should get prefilled? Then no way other than using VFP.

 

But if the picklist value need to be populated after inserting/updating the record with value in lookup then it can be done using trigger.

 

Hope this is clear this time.

 

 

Thanks
Ankit Arora

 

Rahul S.ax961Rahul S.ax961

Ya ankit, i think what you said is correct

S PraveenS Praveen

Thanks for your cooperation

 

So there is no chance without creating the visualforce page.

 

 

Regards,

Praveen

Rahul S.ax961Rahul S.ax961

There could be a chance which is out of my scope,

I think, By using triggers it would be easier.

S PraveenS Praveen

But it should auto populate when user selects the value in the lookup

 

 

Regards,

Praveen

Rahul S.ax961Rahul S.ax961

The action of populating should be performed on saving or Selection of Picklist value?

And i believe, both the records are on different pages. correct me if im wrong!

S PraveenS Praveen

Not after saving it should auto populate based on the lookup selection value at same time.

 

 

Regards,

Praveen

Rahul S.ax961Rahul S.ax961

Are both picklist fields on same page?

S PraveenS Praveen

Depending upon lookup selection value , the picklist values should auto populate and there are dependent picklists.

 

 

Regards,

Praveen