You need to sign in to do that
Don't have an account?
rvg170550
Fill data with retrieved colums from other entity
In Contact, I have a field called Function, that consists out of a drop-down list of functions, accessed via a Lookup-function from Salesforce.
In the Function entity, I have 2 colums next to the Function, Level and Department.
Can someone advise me, how to fill these 2 values in Contact screen, after picking a Function in Contact ?
Many thanks
I am pretty sure you don't want to fill in fields in the Contact record, just display the values on the page. You can easily create a formula field to display values from a related object. These values will show up when a user views the record. You could, of course, add these values to the search dialog for the lookup, which would be the way to get them in entry mode.
Hope this helps.
That would be ideal, but when I create a fomula field, I don't see how to specify my Select-statement, to retrieve the info from another object.
For instance, in a list I want to display the person's name, function, etc, but only info available is the ID.
Can you give me a hint / example to do this kind of select ?
That would be great,
Thanks,
Hope this helps.
Still not solved ...
Let me first define my problem correctly:
We have "Sales"-application with Accounts and Contacts. Every contact has a function (job), that is defined as a lookup relationship to a Custom object (JOB), having one or more colums with job classification in there.
I want, the moment they pick a function from the list, some of these classifications to be shown in Contact Info.
When I define a new custom field, and create a formula to pick-up one of these values, the Custom object (JOB), is not available in the picklist ... (I can only select from $Api, $User, $UserRole, $Profile, $Organisation, Contact).
I had expected to see JOB appear in there as well, since it has a lookup relationship with Contact ...
Thanks, I managed to pick the value, but the problem was, that the info is only visible in the view-format, not in edit mode.
Ok, we can live with that, but I still had 1 extra question:
I only managed to pick up values, when the fields were defined as text fields, but the moment the column contains picklist values, I don't find how to code it:
What do I have to use as prefix / function, to select such a value ?
Is there a corresponding function like the ISPICKVAL ?
Thank you very much
Great - glad that helped. As you can see, to display the value in view format is pretty easy. If you actually want to retrieve the values in edit mode, you will have to get into partial page refreshes in Visualforce pages. Keep in mind that you can modify the search dialog for the lookup to display the fields you want to put on the page, which would give your users a way to see the values at entry time.
Not sure what your second question entails. Do you mean you cannot add a formula to display a picklist value? You will have to use a CASE statement to decode it.
Here I come again.
trigger Before_Insert_Special_Event on SFDC_Special_Event__c (before insert) {
for (SFDC_Special_Event__c ne : Trigger.New)
{
ne.name = ne.mce_product__c;
}
}