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
Kamaljeet Singh Matharu 9Kamaljeet Singh Matharu 9 

lookup to add multiple values in one field

Hello again, help me please 
I have two objects. 1. Account (Standard) 2. Airports (Custom)
There is a field in Accounts called 'Airport Supplied' 
Question: i would to like retrieve multiple name of airports in the above field 

E.g.: Airport Supplied = Delhi, Goa, London, Paris

Please provide the best advise 

Many thanks
BharathimohanBharathimohan
Kamaljeet,
1. If Account and Aiport have master-child relationship:
There is no direct way of doing this. You need to make the "Airport Supplied" field as text area or long text area and populate it via trigger on Airport object.

Trigger should handle after insert, after update (whenever the Airport record name changes), after delete and after undelete on Airport object. This trigger will retreive the "Airport Supplied" text from Account and do manipulations like adding the airport value when a new airport is created under an account or remove from the text when an airport record was deleted etc.,

2. If Account and Airport did not have any relationship, then if you are using standard account pagelayout, then this scenario is not possible. You may need to consider the 1st point (creating master-child relation or lookup relation).
    If you are using custom visualforce page for account, you can try custom lookup field in your visualforce page to open a pop-up which lists records from Airport, making it to allow multiple values into the text area field as comma separated.


Thanks,
Bharathi
Salesforce For All (http://salesforceforall.blogspot.com/" target="_blank)
 
orla oasiorla oasi
Looking for the same solution for my service businsss project. I want to use for for the page of pearson airport limousine (https://limousinepearsonairport.ca/) that hosted on WordPress.