• esazen
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

I have a fieldSet named "ProductFamily" defined for Opportunity Product (OpportunityLineItem).  I also have the following visualforce code using the standardController for OpportunityLineItem:

 

<apex:repeat value="{!$ObjectType.opportunityLineItem.FieldSets.ProductFamily_ProductName}" var="h" rendered="{!(opportunityLineItem.PricebookEntry.Product2.Family == 'ProductFamily' && opportunityLineItem.PricebookEntry.Product2.Name == 'ProductName')}>

   <apex:outputField value="{!opportunityLineItem[h]}"/>

</apex:repeat> 

 

Regardless of the rendered tag, the fields in the "ProductFamily" fieldSet appears no matter what the product name or product family are.  I've printed the values of opportunityLineItem.PricebookEntry.Product2.Family and opportunityLineItem.PricebookEntry.Product2.Name in the page to confirm what they are and they are as I expect, but even when they're not equal to "ProductFamily" and "ProductName" the fields in the fieldset still display.

 

I've tried changing the right side of the rendered tag to "false" and the fieldSet still appears which makes me think this is a salesforce bug?

 

Help!  What am I doing wrong?  I'm about ready to tear my hair out because I can't figure out why this doesn't work.  It seems like it should...

 

Thanks for any help!

  • October 24, 2012
  • Like
  • 0

Are dynamic bindings supported for the actual field set in addition to the fields in a field set?

 

For example can the following:

<apex:repeat value="{!$ObjectType.opportunityLineItem.FieldSets.myFieldSetName}" var="h">

<apex:outputField value="{!opportunityLineItem[h]}" />
</apex:repeat>

 

generate the same output as the following (where opportunityLineItem.PricebookEntry.Product2.Family = "myFieldSetName")?

<apex:variable var="r" value="{!opportunityLineItem.PricebookEntry.Product2.Family}"/>

<apex:repeat value="{!$ObjectType.opportunityLineItem.FieldSets[r]}" var="h">
<apex:outputField value="{!opportunityLineItem[h]}" />
</apex:repeat>

 

I would like the actual field set name to be determined at run time.

 

  • October 22, 2012
  • Like
  • 0
I'm trying to upload a logo.png (1kb) file to replace the default logo for an app in Salesforce.

I've been following many examples on the internet (1 (http://clicksandcode.blogspot.com.au/2011/12/how-to-add-your-company-logo-in.html), 2 (https://success.salesforce.com/answers?id=90630000000gpwGAAQ), 3 (http://forcemonkey.blogspot.com.au/2010/01/how-do-i-add-my-own-custom-logo-to.html)) but they all appear to be based on older versions of Salesforce - apparently the interface changed quite a lot since then and I see no links referred to in those examples.

How do I upload an image to Salesforce (v31.0)?

I've went to Setup -> Build -> Develop -> Static Resources and uploaded my image (set to Public) there but it doesn't appear when I try to use it to replace the logo of my app in
Setup -> Build -> Create -> Apps -> [my app] -> Edit -> Insert an Image

A popup shows up with 'My Personal Documents' and it shows there are no files there.

Where/How should I upload the image so that it is used with my deployed managed package?

How do I retrieve all custom fields on a standard object using the Migration Toolkit Metadata API?

 

The migration tool guide provides this markup for retrieving standard objects (SO), but indicates that custom fields on SOs must be retrieved individually.

 

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account</members>
        <name>CustomObject</name>
    </types>
    <version>19.0</version>
</Package>

I'm looking for more of a wildcard approach to retrieve all fields. My goal is to run an Ant script daily to retrieve and backup all metadata. Is this possible?