I got two objects "Company" and "Contact", and they have 1:M relationship.
in the "All contact" view, which is a list of all the contact fields, including a column to display the company name. However, if I'd like to have a column to display the company's website (which is only a field to Object"Company") in "All contact' view, can it be done?
Thanks.
Hi Cayla.
Suppose if I have object "comany" and object "Contact". I want to display primary contact's phone number in the company's view. Are you suggesting to have one "phone" field for "contact" and another "phone" field for "company"; and get the "phone" field for the primary "contact" and set that value to "phone" field for "company"?
>> Yes, that would be 1 solution. But without using Triggers, you could create a "Template" Field in Company and pull the data from Contacts (This is a non-editable text field).
Thanks,
Shivani.
Hi Cayla,
Yes, it can be achieved.
In the "Contact", create a new field of type "Related Field" and select the Related Field as the Email Address. This will add a column to your View which only renders the Email Address Field of "Company".
For more details, use this doc link
documentation.progress.com/.../index.html
Please let us know if you face any concerns.
Thankyou,
Shivani.
Hi,
I believe you have already established a 1 : M relation with "Company" and "Contacts",i.e One Company to Many Contacts. You will be finding that Field only in Contact Object.
Can you please confirm the Relationship type.
if I change the data in the "All contact" view, will it be updated to "company" as well?
>Yes, it will be updated.
Thanks,
Shivani.
Thanks Shivani, I did have a 1:M relationship set up, (one company to many contacts), and the related field is only available for the M side "contact", not for the 1 side"company". I thought somehow it is the expected behavior, but what I want is to display the primary contact details(phone, first name, last name, etc.) on the company view, without adding the contact attribute for company and have those fields duplicated. Any suggestions?
Hi Cayla,
You can use Object Script Trigger to achieve it.
I have tried it at my end with one Record attached and it worked fine. If you attach multiple records, you will have to use a loop available in the Template helper.
var x =rbv_api.getFieldValue(objName, objId, fieldName);
rbv_api.setFieldValue(objName, objId, fieldname, x);
Hope this helps.
Thanks,
Shivani.
Hi Shivani,
Correct me if I misunderstand.
Suppose if I have object "comany" and object "Contact". I want to display primary contact's phone number in the company's view. Are you suggesting to have one "phone" field for "contact" and another "phone" field for "company"; and get the "phone" field for the primary "contact" and set that value to "phone" field for "company"?
That will do, which I will consider as the backup plan. However, is it possible if I don't want to have the field "phone" for "company", just want to display "phone" in the "company" view as it has the relation with contact.
Thanks,
Cayla
Hi Cayla.
Suppose if I have object "comany" and object "Contact". I want to display primary contact's phone number in the company's view. Are you suggesting to have one "phone" field for "contact" and another "phone" field for "company"; and get the "phone" field for the primary "contact" and set that value to "phone" field for "company"?
>> Yes, that would be 1 solution. But without using Triggers, you could create a "Template" Field in Company and pull the data from Contacts (This is a non-editable text field).
Thanks,
Shivani.