You need to sign in to do that
Don't have an account?
Mohit Kapoor
Not able to edit a child record in nested Query
Hi, I have a code.
I need to update City of NY Timeline record, which is the child record. Any idea how to modify this.
public class sample1 { public List<City_of_NY_Projects__c> acct {get;set;} public sample1() { acct = [SELECT Name, (SELECT Name,Step__c,Phase__c,Version__c,Stage__c,Predecessor__c,Start_Date__c,End_Date__c,Stage_Duration__c,Stage_Duration_2__c,Duration_On_Hold__c,Actual_End_Date__c,Resource_Name__c FROM City_of_NY_Project_Timeline__r WHERE VF_Criteria__c = 'true') FROM City_of_NY_Projects__c limit 5]; } public string editItem {get;set;} public pageReference editBtn() { return null; } public pageReference cancelBtn() { editItem = null; return null; } public PageReference saveBtn() { update acct; editItem = null; return null; } }
I need to update City of NY Timeline record, which is the child record. Any idea how to modify this.
Sumitkumar_Shingavi
Can you elaborate your requirement little more as how you will identify a specific City_of_NY_Projects__c IDs for which you need to fetch City_of_NY_Project_Timeline__c records? Are you using standardController in VF as "City_of_NY_Projects__c"?