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
Bob_zBob_z 

Custom Configurator Id value 00618000007xXxxX is not valid for the QuoteRequest__c standard controller

HI,
 Ive been trying to take example code from a post and work with it in my org, I've done all the step correctly I believe?  but I am getting an error: The Id in the error is belongs to the opportunity record. It happens when i click my custom button. 

If there is another way to recreate a configuration I would be interested in getting that information as well. 

Visualforce Error 
Id value 00618000007xXxxX is not valid for the QuoteRequest__c standard controller

The link to the post :
https://www.verticalcoder.com/2012/05/04/a-poor-mans-product-configurator/

my custom obejct 
Yushin_Product__c takes the place of the CustomProduct__c object in the example 

My Code:
<apex:page standardController="QuoteRequest__c" extensions="BL_QuoteRequestExtension">
  <apex:form >
    <apex:pageBlock >
      <apex:pageMessages />
      <apex:pageBlockButtons >
        <apex:commandButton value="Save" action="{!save}"/>
        <apex:commandButton value="Cancel" action="{!Cancel}"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection title="Custom Product" collapsible="false">
        <apex:outputField value="{!QuoteRequest__c.Yushin_Product__c}"/>
      </apex:pageBlockSection>
      <apex:pageBlockSection columns="1" title="Options" collapsible="false">
        <apex:repeat value="{!$ObjectType.QuoteRequest__c.FieldSets.Group1}" var="f" >
          <apex:inputfield value="{!QuoteRequest__c[f]}" rendered="{!CustomProduct.Equipment_Type__c == 'Group1'}"/>
        </apex:repeat>
        <apex:repeat value="{!$ObjectType.QuoteRequest__c.FieldSets.Group2}" var="f" >
          <apex:inputfield value="{!QuoteRequest__c[f]}" rendered="{!CustomProduct.Equipment_Type__c == 'Group2'}"/>
        </apex:repeat>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>











 
public with sharing class BL_QuoteRequestExtension {
    
  public Yushin_Product__c CustomProduct {get; set;}
  private final QuoteRequest__c opps;
 
  public BL_QuoteRequestExtension(ApexPages.StandardController controller) {
    this.opps = (QuoteRequest__c)controller.getRecord();
    try {
      CustomProduct = [select id, Equipment_Type__c from Yushin_Product__c where id=
                       :ApexPages.currentPage().getParameters().get('Yushin_Product__c')];
    } catch(Exception e) {
      ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.FATAL, 'Error Getting Product Info'));
    }
    if (CustomProduct != null)
    
      this.opps.Yushin_Product__c = CustomProduct.Id;
  }
}





 
Raj VakatiRaj Vakati
Change your controller as below and try and How you are calling this page .. Is there any way you can record and share the screencast link here 
 
public with sharing class BL_QuoteRequestExtension {
    
  public Yushin_Product__c CustomProduct {get; set;}
  private final QuoteRequest__c opps;
 
  public BL_QuoteRequestExtension(ApexPages.StandardController controller) {
    this.opps = (QuoteRequest__c)controller.getRecord();
    try {
      CustomProduct = [select id, Equipment_Type__c from Yushin_Product__c where id=
                       :ApexPages.currentPage().getParameters().get('Id')];
    } catch(Exception e) {
      ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.FATAL, 'Error Getting Product Info'));
    }
    if (CustomProduct != null)
    
      this.opps.Yushin_Product__c = CustomProduct.Id;
  }
}

 
Bob_zBob_z
Here it is

https://www.verticalcoder.com/2012/05/04/a-poor-mans-product-configurator/
Raj VakatiRaj Vakati
Not the URL to blog .. i am looking your application screen cast .. how you are testing and using 
Bob_zBob_z
I will try to do a movie but I have these screenshot for now.

User-added image



User-added image