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
Jagadesh BandaruJagadesh Bandaru 

Save and new - carry forward the parent id

Hi , 

I have overriden the new page for a custom object using vf page and populating the parent id in one of the fields, which is working as expected.
However, when the user clicks Save & New button from edit page, the parent id is not getting populated. Any idea on how to populate this?

This is how my controller looks like:

       res = (childobject__c)controller.getRecord();
        res.Status_TVNA__c='text';
        m_sc=controller;
        if(ApexPages.currentPage().getParameters().get('parentObject__c')!= null)
        res.parentObject__c=ApexPages.currentPage().getParameters().get('parentObject__c');
        
Prakash NawalePrakash Nawale
Hi Jagadesh,

Can you please pass parentObject__c value in query string clicking on Save & Next button with apex:param or in your controller action method return pagereference.

Regards,
Prakash
Skype : nawaleprakash