• mworld2
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 10
    Replies

In the Winter 11 Release Notes it states that the individual callout time limit has been removed. In the Winter 11 Apex Reference it shows a default callout time limit of 10 seconds with a maximum settable value of 60 seconds. Say what? Which one is it? Or am I missing something?

I feel like a dunce but... I have places in my APEX code where I want to navigate to the list page for one of my custom objects. I had been using a hard coded value like '/a0I' which is the id 'prefix' for that object but I have seen that id prefixes can and do change when deployed to a new environment. How do I get at what this is in the particular environment that i am in?

 

Thanks in advance?

Hi all - 

 

We have a Flash movie "package" made up of an SWF file, an FLA file with logic, an XML file with paths to three images, and three image JPG files. Together these display a simple three image slide show. This works fine outside of Salesforce, both locally and embedded into another site that uses the SWFObject player. I zipped these files together, uploaded them into Static resources, and then referenced the SWF file in my VF page like so:

 

 <apex:flash src="{!URLFOR($Resource.Imlogistics, 'imlogistics_flash_home.swf')}" height="270" width="55%" />

 

A correct size box appears on my page with the Next/Prev arrows that are in our SWF file but no slides. Any ideas? Because they are all in the same directory, the image file paths within the XML are just the file name. Is there something else I need to be doing?

I've been asked to run a query and use VF to build an RSS feed with the results, I can't find any reference on how to do this. I understand VF and APEX and the structure of RSS files but what throws me is how to make the output be XML, not HTML.

  • September 10, 2010
  • Like
  • 0

I have two approval processses set up that are identical except for the object type that they service. I have code that submits files for, and recalls files from, the two approval processes. The APEX is the same for both classes (except for the different object). The test code is the same (except for the different object). Because I trap the MANAGER_NOT_FOUND error in my code, I create two users to run my tests under - one with a designated approver and one without. I use runas for this.

 

When I run my test code, I get the same result regardless of which user I was running under, which is definitely wrong, AND one object always hits the exception and the other never does. This is a double nonsense result.

 

Anyone have experience with this?

 

Mauricio

  • September 01, 2010
  • Like
  • 0

My client has requested that I remove these standard left-side Nav items from their SF site. Does anyone know how to do this? Should be easy but I can't find any way to remove them (except from the Home Page)! We have a mix of Stock and VF pages in use.

 

Thanks!

I imported Zuora WSDL v22.0 into my Dev Org using 'Generate from WSDL' and received a compile error on the 'core' API file. The first two (Object API and Fault API) went fine. I received an unexpected token on the word 'update' and expect I would receive one on 'delete' which occurs further down the file. So Zuora has update and delete methods and so does Salesforce - this can't be the first time. - Given that Zuora is at API 22 and SF is at API 19 this has to be something new? I have contacted Zuora but think this is more of an SF issue. The WSDL is copied below for reference. is too large to be included.

 

Ideas? I'd love to hear from SF reps on this.

 

 


 

 

I have an aggravating issue made all the more so because it's so simple:

 

I have built a page that makes a list of dates when it loads and loads the list into a Select List.  When the user selects a date from the list and clicks a button, the APEX code that executes redirects to the same page but this time with a query string parameter containing the date. When the page loads the second time it displays records for that date. Simple. And it works great. THE FIRST TIME. If I change the date using the SelectList and click the button again, there is some server action but the page does not change. What does change is that the back part of the URL (the part that used to contain my querystring parameter) now contains "core.apexpages.devmode.url=1". What the heck? I have tried all manner of ways to fix this and can't overcome it. I am not using any Javascript. This is purely VF and APEX. Nothing exotic. Same stuff I've done elsewhere. This is obviously not all the code butyou can see there is nothing exotic here. Any ideas?

 

 

    public pageReference retrieveTimeCard()
    {
        pageReference pr = new pageReference('/apex/Time_Card_Edit?startDate=' + StartDate);
        pr.setRedirect(true);
        return pr;
    }

<TABLE WIDTH="100%">
                    <TR>
                        <TD WIDTH="10%" ALIGN="right"><B>Week Start Date</B></TD>
                        <TD WIDTH="1%" ALIGN="right">&nbsp;</TD>
                        <TD WIDTH="19%" ALIGN="left">
                            <apex:selectList size="1" value="{!StartDate}">
                                <apex:selectOption itemValue="" itemLabel="--Select--"/>
                                <apex:selectOptions value="{!Sundays}"/>
                            </apex:selectList>
                        </TD>
                        <TD><apex:commandButton action="{!retrieveTimeCard}" value="Find Time-Card"/></TD>
                    </TR>
                </TABLE>

 

 

 

 

I am working on a page that displays files and allows filtering of the results. When the page loads, a list of files is displayed that are appropriate for the user. The user can then select various filtering criteria to shrink the list. The user can also click on the column headers to sort the list. When it works it works perfectly, however it often does not work, at all. The page will not respond to any button clicks and some links. This happens "randomly" across platforms, browsers, and users. At any given point the page may start responding, only to stop later. I cannot see anything in the code that would account for this. If you have any ideas please share them. :-)  The VF is below. The APEX is in the second message in the thread.

 

 

//VF
<apex:page standardController="Content__c" tabStyle="Content__c" extensions="ListContent_Extension">
    <apex:form id="search">

        <apex:pageBlock >
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!executeSearch}" value="Find Content" reRender="results"/>&nbsp;&nbsp;&nbsp;&nbsp;
                <apex:commandButton action="{!clear}" value="Clear Search" reRender="criteria,results"/>
            </apex:pageBlockButtons>

            <apex:pageBlockSection title="Search Content" collapsible="false"/>
            
            <apex:pageMessage strength="2" severity="error" detail="{!errorMessage}" rendered="{!errorFlag}" />
            <TABLE WIDTH="100%" id="criteria">
                <TR>
                    <TD WIDTH="7%" ALIGN="right"><B><apex:outputLabel value="Search:" /></B></TD>
                    <TD WIDTH="12%">
                        <apex:inputText value="{!searchField}" id="searchField" />
                    </TD>
                    <TD WIDTH="7%" ALIGN="right"><B><apex:outputLabel value="Services" /></B></TD>
                    <TD WIDTH="12%">
                        <apex:selectList value="{!services}" size="4" multiselect="true">
                            <apex:selectOption itemValue="" itemLabel="-- ANY --" />
                            <apex:selectOptions value="{!ServicesItems}" />
                        </apex:selectList>
                    </TD> 
                    <TD WIDTH="7%" ALIGN="right"><B><apex:outputLabel value="Content Type" /></B></TD>
                    <TD WIDTH="12%">
                        <apex:selectList value="{!contentType}" size="4" multiselect="true">
                            <apex:selectOption itemValue="" itemLabel="-- ANY --" />
                            <apex:selectOptions value="{!ContentTypeItems}" />
                        </apex:selectList>
                    </TD> 
                    <TD WIDTH="7%" ALIGN="right"><B><apex:outputLabel value="File Type" /></B></TD>
                    <TD WIDTH="13%">
                        <apex:selectList value="{!fileType}" size="4" multiselect="true">
                            <apex:selectOption itemValue="" itemLabel="-- ANY --" />
                            <apex:selectOptions value="{!FileTypeItems}" />
                        </apex:selectList>
                    </TD>
                    <TD WIDTH="23%" ALIGN="right">
                        <B><apex:outputLabel value="Date Range Start" /></B>&nbsp;&nbsp;
                        <apex:inputField value="{!Content__c.Filter_Date_Start__c}" /><BR/><BR/>
                        <B><apex:outputLabel value="Date Range End" /></B>&nbsp;&nbsp;
                        <apex:inputField value="{!Content__c.Filter_Date_End__c}" />
                    </TD>
                 </TR>
            </TABLE>   
        </apex:pageBlock>

        <apex:pageBlock >
            <apex:pageBlockTable value="{!contents}" var="c" rowClasses="odd,even" columns="9" styleClass="tableClass" id="results">
                <apex:facet name="caption">My Contents</apex:facet>
                <apex:facet name="header">Contents</apex:facet>

                <apex:column >
                    <apex:commandLink value="Edit" action="{!editPage}">
                        <apex:param name="Id" value="{!c.Id}" assignTo="{!Id}" />
                    </apex:commandLink>&nbsp;/&nbsp;
                    <apex:commandLink value="Download" action="{!download}" onClick="window.open('{!c.S3_URL__c}')">
                        <apex:param name="Id" value="{!c.Id}" assignTo="{!Id}" />
                    </apex:commandLink>
                </apex:column>

                <!--BEGIN SORTABLE COLUMNS-->
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Content Name" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Name" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.name}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Services" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Services__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.Services__c}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Content Type" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Content_Type__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.Content_Type__c}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="File Type" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="File_Type__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.File_Type__c}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Author" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Author_Search__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.Author_Search__c}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Created Date" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="CreatedDate" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                   <apex:outputText style="text-align:center" value="{!MONTH(c.CreatedDate)}/{!DAY(c.CreatedDate)}/{!YEAR(c.CreatedDate)}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Download Date" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Download_Date__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText rendered="{!NOT(ISNULL(c.Download_Date__c))}" style="text-align:center" value="{!MONTH(c.Download_Date__c)}/{!DAY(c.Download_Date__c)}/{!YEAR(c.Download_Date__c)}" />
                </apex:column>
                <!-- END SORTABLE COLUMNS -->

                <apex:column >
                    <apex:facet name="header">Comments</apex:facet>
                    <apex:outputText value="{!c.Comments__c}" />
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 THANKS!

 

I am an expereinced VF and APEX Developer working with email generation for the first time.

 

My client wants to send a recap of appointment activity to an email distribution list, some of the members of which are SF users and some are not. This recap is generated by the user upon selection of a date range and account name. This recap is sent to a VF page for preview by the user. I would like to integrate this display code into a VF Email template and then send it to the distribution list.

 

Can VF Email Templates be used to send email to a list of email addresses, rather than a list of Contacts, Users, or Leads? The examples I have seen are confusing.

 

Thanks!

 

Mauricio

We are building a product that includes a Custom VisualForce Component called "CustomSettingAddress" that renders a form on the page using data retrieved from the database via custom SOQL, and then saves data back to Salesforce. This works perfectly in development, and when included in pages that are deployed as part of the G2 package.

 

However, when we attempt to embed this managed component in an unmanaged VisualForce page (e.g. in our customer's org) we are running into security issues. The component itself is global, and we would prefer not to make the controller global, but if we don't then the customer receives a message "the managed class g2.CustomSettingAddressCtl is not accessible". To resolve the problem, we make the controller and all methods global. This allows us to render the form properly, including data from accessor methods that reference other public (but not global) managed classes from within the controller. However, when we attempt to post back to the controller (using a CommandButton) we receive an "insufficient permissions" error.
Any ideas or suggestions on best practices for writing controllers for global components in managed packages? Do we need to make all classes referenced by the controller global as well?

I feel like a dunce but... I have places in my APEX code where I want to navigate to the list page for one of my custom objects. I had been using a hard coded value like '/a0I' which is the id 'prefix' for that object but I have seen that id prefixes can and do change when deployed to a new environment. How do I get at what this is in the particular environment that i am in?

 

Thanks in advance?

Hi

I created a custom text field named Plot S.no ,i created a custom button Transfer ,when clicked opens a VF page with Plot sno,here i wantedplot sno as Look up field....

 

Any ideas please...!?

  • October 18, 2010
  • Like
  • 0

I've been asked to run a query and use VF to build an RSS feed with the results, I can't find any reference on how to do this. I understand VF and APEX and the structure of RSS files but what throws me is how to make the output be XML, not HTML.

  • September 10, 2010
  • Like
  • 0

My client has requested that I remove these standard left-side Nav items from their SF site. Does anyone know how to do this? Should be easy but I can't find any way to remove them (except from the Home Page)! We have a mix of Stock and VF pages in use.

 

Thanks!

I wish to create a custom template for approvals, however I am having some trouble finding where in the documentation it specifies the name of the merge fields related to the approval such as those to generate the link, all I could find was this reference in the online help "If the email template you choose contains approval merge fields named {!ApprovalRequest.field_name},..." but it does not specify what the field names are for the approval request.

 

 

Know where I can find more information.

I have an aggravating issue made all the more so because it's so simple:

 

I have built a page that makes a list of dates when it loads and loads the list into a Select List.  When the user selects a date from the list and clicks a button, the APEX code that executes redirects to the same page but this time with a query string parameter containing the date. When the page loads the second time it displays records for that date. Simple. And it works great. THE FIRST TIME. If I change the date using the SelectList and click the button again, there is some server action but the page does not change. What does change is that the back part of the URL (the part that used to contain my querystring parameter) now contains "core.apexpages.devmode.url=1". What the heck? I have tried all manner of ways to fix this and can't overcome it. I am not using any Javascript. This is purely VF and APEX. Nothing exotic. Same stuff I've done elsewhere. This is obviously not all the code butyou can see there is nothing exotic here. Any ideas?

 

 

    public pageReference retrieveTimeCard()
    {
        pageReference pr = new pageReference('/apex/Time_Card_Edit?startDate=' + StartDate);
        pr.setRedirect(true);
        return pr;
    }

<TABLE WIDTH="100%">
                    <TR>
                        <TD WIDTH="10%" ALIGN="right"><B>Week Start Date</B></TD>
                        <TD WIDTH="1%" ALIGN="right">&nbsp;</TD>
                        <TD WIDTH="19%" ALIGN="left">
                            <apex:selectList size="1" value="{!StartDate}">
                                <apex:selectOption itemValue="" itemLabel="--Select--"/>
                                <apex:selectOptions value="{!Sundays}"/>
                            </apex:selectList>
                        </TD>
                        <TD><apex:commandButton action="{!retrieveTimeCard}" value="Find Time-Card"/></TD>
                    </TR>
                </TABLE>

 

 

 

 

I am working on a page that displays files and allows filtering of the results. When the page loads, a list of files is displayed that are appropriate for the user. The user can then select various filtering criteria to shrink the list. The user can also click on the column headers to sort the list. When it works it works perfectly, however it often does not work, at all. The page will not respond to any button clicks and some links. This happens "randomly" across platforms, browsers, and users. At any given point the page may start responding, only to stop later. I cannot see anything in the code that would account for this. If you have any ideas please share them. :-)  The VF is below. The APEX is in the second message in the thread.

 

 

//VF
<apex:page standardController="Content__c" tabStyle="Content__c" extensions="ListContent_Extension">
    <apex:form id="search">

        <apex:pageBlock >
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!executeSearch}" value="Find Content" reRender="results"/>&nbsp;&nbsp;&nbsp;&nbsp;
                <apex:commandButton action="{!clear}" value="Clear Search" reRender="criteria,results"/>
            </apex:pageBlockButtons>

            <apex:pageBlockSection title="Search Content" collapsible="false"/>
            
            <apex:pageMessage strength="2" severity="error" detail="{!errorMessage}" rendered="{!errorFlag}" />
            <TABLE WIDTH="100%" id="criteria">
                <TR>
                    <TD WIDTH="7%" ALIGN="right"><B><apex:outputLabel value="Search:" /></B></TD>
                    <TD WIDTH="12%">
                        <apex:inputText value="{!searchField}" id="searchField" />
                    </TD>
                    <TD WIDTH="7%" ALIGN="right"><B><apex:outputLabel value="Services" /></B></TD>
                    <TD WIDTH="12%">
                        <apex:selectList value="{!services}" size="4" multiselect="true">
                            <apex:selectOption itemValue="" itemLabel="-- ANY --" />
                            <apex:selectOptions value="{!ServicesItems}" />
                        </apex:selectList>
                    </TD> 
                    <TD WIDTH="7%" ALIGN="right"><B><apex:outputLabel value="Content Type" /></B></TD>
                    <TD WIDTH="12%">
                        <apex:selectList value="{!contentType}" size="4" multiselect="true">
                            <apex:selectOption itemValue="" itemLabel="-- ANY --" />
                            <apex:selectOptions value="{!ContentTypeItems}" />
                        </apex:selectList>
                    </TD> 
                    <TD WIDTH="7%" ALIGN="right"><B><apex:outputLabel value="File Type" /></B></TD>
                    <TD WIDTH="13%">
                        <apex:selectList value="{!fileType}" size="4" multiselect="true">
                            <apex:selectOption itemValue="" itemLabel="-- ANY --" />
                            <apex:selectOptions value="{!FileTypeItems}" />
                        </apex:selectList>
                    </TD>
                    <TD WIDTH="23%" ALIGN="right">
                        <B><apex:outputLabel value="Date Range Start" /></B>&nbsp;&nbsp;
                        <apex:inputField value="{!Content__c.Filter_Date_Start__c}" /><BR/><BR/>
                        <B><apex:outputLabel value="Date Range End" /></B>&nbsp;&nbsp;
                        <apex:inputField value="{!Content__c.Filter_Date_End__c}" />
                    </TD>
                 </TR>
            </TABLE>   
        </apex:pageBlock>

        <apex:pageBlock >
            <apex:pageBlockTable value="{!contents}" var="c" rowClasses="odd,even" columns="9" styleClass="tableClass" id="results">
                <apex:facet name="caption">My Contents</apex:facet>
                <apex:facet name="header">Contents</apex:facet>

                <apex:column >
                    <apex:commandLink value="Edit" action="{!editPage}">
                        <apex:param name="Id" value="{!c.Id}" assignTo="{!Id}" />
                    </apex:commandLink>&nbsp;/&nbsp;
                    <apex:commandLink value="Download" action="{!download}" onClick="window.open('{!c.S3_URL__c}')">
                        <apex:param name="Id" value="{!c.Id}" assignTo="{!Id}" />
                    </apex:commandLink>
                </apex:column>

                <!--BEGIN SORTABLE COLUMNS-->
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Content Name" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Name" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.name}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Services" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Services__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.Services__c}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Content Type" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Content_Type__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.Content_Type__c}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="File Type" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="File_Type__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.File_Type__c}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Author" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Author_Search__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText value="{!c.Author_Search__c}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Created Date" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="CreatedDate" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                   <apex:outputText style="text-align:center" value="{!MONTH(c.CreatedDate)}/{!DAY(c.CreatedDate)}/{!YEAR(c.CreatedDate)}" />
                </apex:column>
                <apex:column >
                    <apex:facet name="header">
                        <apex:commandLink value="Download Date" action="{!doSort}" rerender="table">
                            <apex:param name="sortField" value="Download_Date__c" assignTo="{!sortField}" />
                        </apex:commandLink>
                    </apex:facet>
                    <apex:outputText rendered="{!NOT(ISNULL(c.Download_Date__c))}" style="text-align:center" value="{!MONTH(c.Download_Date__c)}/{!DAY(c.Download_Date__c)}/{!YEAR(c.Download_Date__c)}" />
                </apex:column>
                <!-- END SORTABLE COLUMNS -->

                <apex:column >
                    <apex:facet name="header">Comments</apex:facet>
                    <apex:outputText value="{!c.Comments__c}" />
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 THANKS!

 

I would like to filter the contents of a lookup field on a Visualforce page.  For example, on a VF "Registration" page (which creates Campaign Member records), I want to limit/filter the lookup of Campaigns to those with Type="Event".

 

Is this possible?

 

Thanks!

Barb

  • February 16, 2010
  • Like
  • 0
Is there a way to throw a File Not Found exception in Apex that will cause the File Not Found page to be shown in a site context, or is the only way to redirect to the file not found page if I detect missing content?
  • June 10, 2009
  • Like
  • 0