Skip to main content

Hi Community, I have a custom lookup field. When creating a new record, i am populating the the lookup field and after saving the record i am not able to see the lookup field value on the detail page. I don’t understand what is going wrong here. This is very basic and worked on so many look-up fields but i never came across an issue like this. Can anyone tell me if i have something to correct? Thank you.

Hi Avinash,

Can you describe this page and process in a little more detail? When you’re creating a new record on object A and saving it, are you then expecting the lookup relationship to show up on object B’s record? Depending on how your page is set up, you may just need to re-query the relevant model. 



Hi Mark,


I have a Wizard component where in the second step ill populate the fields related to master object. Once i hit the next step button i will taken to the detail object layout (Within the wizard) by creating master record. Here i will fill in the detail objects fields and will save it. This way i’m saving both master and detail object records. But when go to its detail view, i don’t see the lookup field populating.


The actions i have on the next step button (layout where master object fields are showed) is

1. Saving the master Object’s model changes.

2. Navigate to next step.


Is there anything i need to add here?


Thanks.


You may need to requery the detail object’s model after saving the master object’s changes, so your page can see the new relationship that was created. 


By master and detail objects do you mean parent and child relationship objects?


Yes. Parent and child relationship.


Hi Mark,

I added re query action on the save button within the wizard component. But no luck.

i want to mention some thing here. If you look at the below screenshot, There are two Look-up Fields. One is Requested By and the other is Manager name. Requested By is populated whenever with the logged in users name. and Manager name field is manually entered by looking up in to the user object. a6aad75c92b2ee3d1463a3c4f1ee97483903e07c.png Now, when i open the Detail page, i am getting the following view. 32bbd1a61f075b99d2a2ac760c36c581ce85200e.png here the requested by is populated properly but the Manager Name field id not populating. But if i look at the record in its classic view i see the name on the Manager Name Field. Is there anything more i have to do to resolve this issue?


Thank you for those screenshots.
Does the model that contains Manager Name get saved before you see the detail page? 
Also, is the detail page in step 3?

Finally, is the model that’s showing the blank Manager Name field on the detail page being queried after Manager Name is saved?


Hi Avinash, I saw that you responded but removed your response. If you were having trouble attaching images, I believe our Community was having some trouble because of the widespread issues with Amazon S3 services. It looks like uploaded images on the Community are working now. 


Hi Mark, Yes. the model that contains manager name is saved before i see the detail page. Step 3 has the detail objects fields and looks like this 173d4d3a409bbabca0049cf082187b5aa547c1f5.png previously i added Query action on the Next step button that you see on the step-2. After that when i click next step button on Step-2, i was not able to see the detail objects fields in step 3 (An empty wizard step shown below ). So i now removed that query action to see the Detail objects fields. Now when i click save on step -3 it will take me to the list view of the object. it looks something like this. fc2cfc1e833ce295614f328ff1512bc1c63700ca.png Whenever i click on any record’s name it redirects me to the record’s detail view. The detail view of the record looks like this. 35daf0feda28033d90ff9f784f1d17eac15d980d.png Does this info help?


What does the Manager Name field look like on the model itself? It sounds like this field is being pulled into the Skuid page in a way that’s making it read-only.


For example, if I want to create a new Contact record, and associate it with an Account record, I would use the AccountId field on the Contact object for this. If I were to try and save the Contact record with changes to Account.ParentId or Account.Id , it wouldn’t work because this method of bringing in fields from a related object provides read-only access.



Another possibility: If both of the fields you highlighted in the above screenshot are set up in the same way, and one field is being saved while the other is not, you may need to look at the way the fields themselves are set up in Salesforce, and compare the permissions and security settings to see if the Manager Name field has any settings protecting it from receiving changes.


So, Manager Name is a custom lookup field. It is looking up on to the standard user object. dc14821f201040a5cce72eadae20587c1529887f.png Generally there shouldn’t be a problem to display the User sObjects data. Also The manager field is not read only. Because when i click on the field i see the User ID popping up. It looks like this Now even if i manually populate the name and save it, it is not showing the name on the page (The name is hidden). This is really weird.


Hi Mark, i exactly don’t know what the issue is but just now i created a new lookup field with the similar behavior and it is working absolutely the way i wanted. This is totally weird. This to me sounds like, two custom fields with same behavior. but one among them is not working. Anyways my issue was resolved. Thank you very much working with me on this issue.


If you’re attempting to create a lookup to the Standard User Object, unfortunately it sounds like Salesforce does not allow that kind of relationship on the User Object. More information can be found here.

I’m pleased that you were able to find a solution - would you mind describing what you did differently?


Sure. I was trying out different things and as part of it, i created a new custom lookup field looking up to user object. that’s it. It worked. I see the value i entered during the record creation showing up in the detail page This is not the first time i’m linking a custom field to Standard user objects data. Every time i created such a lookup relation, it worked. But I still couldn’t figure out why that particular field failed to populate the field value. I checked the field permissions and everything looked same.