0

I have a VF page through which upon selection it is creating an Agreement record. As per the current implementation record is created successfully but inputfield value is not getting passed to the controller where agreement record creation is happening. I reviewed most of the articles but had no luck. Any help will be appreciated

Can someone please help me with where I'm going wrong?

1 Answer 1

0

You need to add standardController to your apex page.

<apex:page extensions="LOAGeneratorController" standardController="Apttus__APTS_Agreement__c" showHeader="false" sidebar="false">


public LOAGeneratorController(ApexPages.StandardController controller) { agreement = new Apttus__APTS_Agreement__c(); } 

I hope this will resolve your problem.

8
  • No, it gave the below error message Unknown constructor 'LOAGeneratorController.LOAGeneratorController(ApexPages.StandardController controller)'
    – Snehal
    Jan 6, 2023 at 9:08
  • Okay, you also need to add below constructor - public LOAGeneratorController(ApexPages.StandardController controller) { agreement = new Apttus__APTS_Agreement__c(); } Jan 6, 2023 at 9:38
  • Tried this initially, but I already have a constructor in there if I modified to the structure you mentioned it is throwing this error. Attempt to de-reference a null object
    – Snehal
    Jan 6, 2023 at 9:45
  • can you share the updated changes? Jan 6, 2023 at 9:55
  • Updated question with changes you asked to do
    – Snehal
    Jan 6, 2023 at 10:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .