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
rakesh ranjanrakesh ranjan 

Case page got saved without link of VF page (lookup)

we have an issue. In case object we have a field called "Safety question link". It has a look up relation with Case object and then We have a button called "safety question". when click on this button a VF page gets opened with few questions. Once the answers are submitted for those question and without closing the VF page if I directly go to the case details page and do some other activity (like subject change) at the same time and then I close the VF page. the safety question link(lookup) field does not get updated.
However it works fine if I don't make any changes in the case page and just close the VF page after submitting the question. ALso it works if I don't close the VF page but refresh the case page. Can someome please help.
NagendraNagendra (Salesforce Developers) 
Hi Rakesh,

 I suppose when you submit the VF page, but don't close it and make changes to the case, some process triggers in the background and wipes out the field that was updated by the VF page.

Since you didn't refresh the case page layout after clicking the button, you don't see the change there.

Try submitting the questions and without closing the VF page, refresh the case, and see if the lookup value is updated.

There definitely some processes like a Process Builder or Trigger running that are messing up the values. Check them.

Kindly mark this as solved if it's resolved.

Best Regards,