• Chris D
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 13
    Replies
The way to extract specific picklist values for a field based on record type would involve the sforce call describeLayout and passing it the name of the salesforce entity you need to get info for. Once you have a DescribeLayoutResult object, you will be able to pull back an array of recordTypeMappings for the specified object. The name method on the RecordTypeMapping object will tell you which record type you are referencing. The picklistsForRecordType method will return an array of PicklistForRecordType objects that has a name method to specify the field and a picklistValues method that returns an array of PicklistEntry objects. This is how you will be able to obtain the specific picklist values for a field in a given record type of an object.

That being said, this does not apear to work for the Salutation field in the Contact entity. Is this a bug or am I overlooking something?

Were the governor limits for the count(), or new aggregate functions relaxed or, are developers and larger organizations still ham-boned by the 10,000 record governor limit? 

 

It's very hard to add aggregate averages or summary values to VF pages without implementing a M : D (master - details) relationship (which in a lot of use cases it's considered a bad practice to automatically delete child records), just to incorporate roll up summary fields (which itself had suffered from recursion issues in the past).

 

 

-Rob

Message Edited by rcraven on 01-19-2010 03:57 PM
I tried moving a page in a sandbox from dev enviornment. This page is still working correctly on dev.
But on trying to save the page on sandbox, I received the following error:
Expression Error: Named Object: core.apexpages.components.cdk.ApexComponentRefHandler not found.

Apparently, this is caused when you use <apex:pageMessages /> in your Visualforce page. I remove this one line and my page is saved without a problem.

I have no clue what the error means and how to avoid it. Could someone help me out of this?

Thanks

  • August 26, 2008
  • Like
  • 0
Hello,

I like the concept of using custom component to encapsulate generalized UI and being able to use in more than one visual force page with different sets of data.

However, I have a situation where I use apex components, within a custom component, with id attributes. This is creating a problem when multiple instances of the custom component is used in same visual force page.

Is this a serious limitation? Something like 'prependId' attribute, of an <apex:form> tag, could help - so that unique child client-ids could be generated for all tags/components inside a custom component and provide some mechanism to refer it in attributes like 'rerender', 'status' etc (just like using {!$Component} object in a javascript DOM to access HTML objects).

My situation:
The controller class IPIBAs guarantees different sets of data with different parameters. The controller used in the page has multiple references to instances of IPIBAs created with different parameters.


Component Code:
<apex:component>
  <apex:attribute required="true" name="ipIBAs" type="IPIBAs" description="" />
  <apex:outputPanel style="height:15px;" layout="block">
    <apex:actionStatus startText="loading..." stopText="" id="panelIPIBAsStatusLoading" />
    <apex:actionStatus startText="saving..." stopText="" id="panelIPIBAsStatusSaving" />
    <apex:actionStatus startText="cancelling..." stopText="" id="panelIPIBAsStatusCancelling" />
    <apex:actionStatus startText="deleting..." stopText="" id="panelIPIBAsStatusDeleting" />
  </apex:outputPanel>
  <apex:outputPanel id="panelIPIBAs" layout="block">
    <apex:form rendered="{!(ipIBAs.viewMode == 1)}">
      <apex:pageBlock title="Activities :: Listings">
        <apex:pageBlockButtons>
          <apex:commandButton value="Edit" rerender="panelIPIBAs" rendered="{!(ipIBAs.ipIBAsCount > 0)}" status="panelIPIBAsStatusLoading">
            <apex:param value="2" assignTo="{!ipIBAs.viewMode}" />
          </apex:commandButton>
        </apex:pageBlockButtons>
<!-- other fields here -->
</apex:pageBlock> </apex:form> <apex:form rendered="{!(ipIBAs.viewMode == 2)}"> <apex:pageBlock title="Activities :: Edit"> <apex:pageBlockButtons> <apex:commandButton value="Save" rerender="panelIPIBAs" action="{!ipIBAs.save}" status="panelIPIBAsStatusSaving" /> <apex:commandButton value="Cancel" rerender="panelIPIBAs" action="{!ipIBAs.cancel}" status="panelIPIBAsStatusCancelling" /> </apex:pageBlockButtons>
<!-- other fields here -->
</apex:pageBlock>
</apex:form>
<apex:form rendered="{!(ipIBAs.viewMode == 3)}">
<apex:pageBlock title="Activities :: New">
<apex:pageBlockButtons>
<apex:commandButton value="Save" rerender="panelIPIBAs" action="{!ipIBAs.saveNewRecord}" status="panelIPIBAsStatusSaving" />
<apex:commandButton value="Cancel" rerender="panelIPIBAs" action="{!ipIBAs.cancelNewRecord}" status="panelIPIBAsStatusCancelling" />
</apex:pageBlockButtons>
<!-- other fields here -->
</apex:pageBlock>
</apex:form>
<apex:form rendered="{!(ipIBAs.viewMode == 4)}">
<apex:pageBlock title="Activities :: Confirm Delete">
<apex:pageBlockButtons>
<apex:commandButton value="Yes" rerender="panelIPIBAs" action="{!ipIBAs.deleteSelected}" status="panelIPIBAsStatusDeleting" />
<apex:commandButton value="No" rerender="panelIPIBAs" action="{!ipIBAs.cancelDelete}" status="panelIPIBAsStatusCancelling" />
</apex:pageBlockButtons>
<!-- other fields here -->
</apex:pageBlock>
</apex:form>
</apex:outputPanel>
</apex:component>

 
Whenever I try to include two or more of this component, I get

Error: Duplicate ids have been detected: 'panelIPIBAsStatusLoading'

How could visualforce ensure unique 'clientid's would be generated for child components of a custom component?

Any suggessions?

Thanks,
TheColdFusion
Folks,

Anyone know why I would be getting an Invalid Session error when I try to call a javascript function from an onclick event in the my Visualforce page.  The javascript function has a data call using the sforce.connection.query syntax.  Everytime I test fire my onclick event, I get a popup error on my VF page stating that the Invalid session...Illegal session and some other text....

Any help is greatly appreciated...

Thanks
Hello,

We're having an issue with running Web-to-Case on our sandbox environment. Specifically, the servlet url (https://test.salesforce.com/servlet/servlet.WebToCase) keeps redirecting us to a login page once the form is submitted. Should we be using some alternate url or is this functionality completely disabled for sandbox accounts?
  • February 12, 2008
  • Like
  • 0

If we dig through the now *production* product, Call Scripting, and we look through the Javascript that is behind it, I see a bunch of code for talking to the version 8.0 endpoint, managing Contexts, Graphics, and some compatability stuff for maintaining a V7, V8 world.  As well as helpers that some of us have been using for a long time like the QueryString stuff, etc.

Can we start using this V8 stuff and count on it as part of the production environment since it's part of a production product?  Or am I digging too far into the implementation and it's not to be relied on (as I expect) for external use.


I've also got quite a library now of Bug fixes to the 3.3 Beta release which has been Beta for a "long" time.

Can we have a glimpse of the master plan?  When V8 comes out will it be upwards compatible with the V7 stuff, or, since this has been "Beta", is that not guaranteed?

Thanks, Steve



During an update, a property that was set to null or empty is not getting updated.

//this line will not update the Approver__c attribute if the value is null
oppt.set("Approver__c", products[pos].get("Approver__C"));

Please advise.