Update a sObject record related with another sObject using Visualforce
In this part, I am going to explain how to update a contact record related to an account object in the visualforce page. Scenario-- A VF Page showing a list of account record with a radio button and when you select an account from given list then it shows related contacts of selected account in the page and then you can update your record. Controller-- public with sharing class AllAccounts { public List<Account> acList {get;set;} public List<Contact> conList {get;set;} public string accId {get;set;} public string eml {get;set;} public AllAccounts() { acList = new List<Account>(); for(Account a : [select id,name,accountnumber from account limit 10]) { acList.add(a); ...