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
kkanthakkantha 

Unable to see text sourced from object A when editing object B

Hope someone can help.  I am new to cloud/force.com.  I am trying to get text data from one object to show up in another object while it is in edit mode.  

 

Object A contains text fields (objectives).  In Object B we have a Lookup field to select a particular Object A record.  This matches a new B record to a particular A record.  Then we have formula fields for the objectives which automatically draw the text from the A record so that they can be seen in the new B record.  The idea of this is that the A record objectives are the same for every new B record associated with that A record (one to many relationship).  

 

I want the user to fill in the B record with new information and tick checkboxes while referencing the objectives that have been pulled in from the A record.  But the problem is that while we are in edit mode of the new B record, the user cannot see the objectives that will be populated from the A record until the record is saved.  Even after saving and populating those objectives fields, if we go back into edit mode to tick the checkboxes and fill in the information, we again can't see the objectives fields.

 

Anyone any ideas of how can I do this?  

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

Formula fields aren't displayed on the edit pages, as you aren't allowed to change the data. Off the top of my head I can think of the following options:

 

(1) Turn these into real fields and use workflow to update them - as this is cross object it may or may not be possible

(2) Turn these into real fields and use a trigger to update them.

(3) Visualforce the editing

(4) Enable inline editing so users can double click to edit a field when in record view mode.

 

4 is the least labour intensive and intrusive mechanism.

All Answers

bob_buzzardbob_buzzard

Formula fields aren't displayed on the edit pages, as you aren't allowed to change the data. Off the top of my head I can think of the following options:

 

(1) Turn these into real fields and use workflow to update them - as this is cross object it may or may not be possible

(2) Turn these into real fields and use a trigger to update them.

(3) Visualforce the editing

(4) Enable inline editing so users can double click to edit a field when in record view mode.

 

4 is the least labour intensive and intrusive mechanism.

This was selected as the best answer
kkanthakkantha

Hey bob

 

Thanks so much for your reply.  Option 4 looks the easiest for my level right now too.  Can you tell me how I enable inline editing?

Cheers!

KK

kkanthakkantha

Hey, no worries, I realise I already have it enabled as I can double click on a field to edit it...thanks, you've been a wonderful help!