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
SteveBowerSteveBower 

Invalid variant 'parent': value 'Contact'

This seems like a bug to me.  

 

(Note: there are other long running threads on this however as near as I can tell it still has no resolution.)

 

 

1. Create a custom object called "A".  (No fields needed, etc.)

 

2. Create a custom object called "B".  Give it two custom fields, both Lookups, one to "A", and one to Contact.

 

3. Create an A record, a Contact record, and a few B records that lookup to both of them.

 

4. Create the VF Page and Controller below. 

 

5. On the B object definition create a List Button, allow multi-record selection, using the VF page.  (I called mine "Show Multiple Bs")

 

6. On the A custom object add the Button to the Related List for B. 

 

7. On the Contact object add the Button to the Related List for B.

 

 

Now when you select a few B checkboxes and launch this from your A record  it will work and display the B record ID's (as that's the only thing in there.)

 

When you launch it from the Contact record, it will give you the error:  Invalid variant 'parent': value 'Contact'

 

Any help or suggestions are appreciated.  Thanks, Steve.

<apex:page standardController="B__c" recordSetVar="GetFromController" extensions="Controller_ShowMultipleBs">

<apex:form >

<apex:pageBlock >

<apex:pageBlockButtons >

<apex:commandButton action="{!cancel}" value="Done"/>

</apex:pageBlockButtons>

<apex:pageBlockSection >

<apex:pageBlockTable value="{!theBs}" var="oneB" columns="1">

<apex:column value="{!oneB}" />

</apex:pageBlockTable>

</apex:pageBlockSection>

</apex:pageBlock>

</apex:form>

</apex:page>

 

 

public with sharing class Controller_ShowMultipleBs {

public List<B__c> theBs {get; set;}

public Controller_ShowMultipleBs(ApexPages.StandardSetController stdSetController) {

theBs = (List<B__c>)stdSetController.getSelected();

}

}

 

Thanks.

 

p.s. In another thread there is a reference to a Bug number W-672711.  I called support today and the guy was unable to find *any* sign of this bug number, Open, closed, etc.  So, I don't know what's up with that. 

 

Message Edited by SteveBower on 02-09-2010 02:35 AM
DrawloopSupportDrawloopSupport

Having the same issue here. Any info would be greatly appreciated.

 

Thanks!

SteveBowerSteveBower

In case anybody is tracking the problem, today, March 9'th Ihad a phone call with Mohit Mohan from support, I walked him through the problem, referred him to the case number in this thread:

 

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=21538#M21538

 

I have raised case number 03332481

 

 

and he's going to look into it and get back to me.   He was able to reproduce the problem in my development account.  (For some reason the B ID's weren't displaying correctly when launched from the A record, however at least it still went to the VF page and didn't fail with the Variant message as it did when launched from the Contact record.

 

We'll see...

DrawloopSupportDrawloopSupport
Thanks for the update Steve!
SteveBowerSteveBower
Mohit got back to me and said this bug is being closed as a known issue that the developers are working on.  Expectation is that it will be released as a patch and not wait for a major release.  Couldn't give me a days/weeks/months timeframe.