You need to sign in to do that
Don't have an account?
Bob_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:
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; } }
https://www.verticalcoder.com/2012/05/04/a-poor-mans-product-configurator/