• dchasman
  • SMARTIE
  • 920 Points
  • Member since 2005

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

[Preface: as of today, all of our organizations' S-Controls which used 'http://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js' do not work! This means that we must convert all of our S-controls procedures (about 20) to APEX during this weekend! Why did this happen? Without a warning? Note that we are not the only ones. See here]

 

Could you please help on the following matters?

 

I have a link in Accounts, which runs an S-control that creates a new Opportunity with some data prefilled. How can I create this in APEX-Visualforce? Create a custom link with on-click Javascript? How can I create an APEX controller + Visualforce page that:

1) gets some values from the current Account page? (old way: var AccountName = "{!Account.Name}";)

2) creates a new Opportunity object and fills in some fields

3) Saves the new Opp and redirects the browser to the new Opp page?

 

Thank you for your help!

Alex

Hello everyone,

 

I'm currently working with customer portal, don't know if this also happens outside of Customer Portal, but when I have a paramter in the url that has double underscore, suchas as theparam=thevalue__x, I get an Insufficient Privileges Error.This was not happening yesterday...

 

Any idea on why this is happening?

 

Thanks in advance.

We have several Visualforce pages being used in our org. These were working okay until evening of 20th. But now few of them are showing the following error

 

Tag library supports namespace: http://salesforce.com/standard/components/apex, but no tag was defined for name: form

 

I checked through the forums for a solution and found that salesforce is working on fixing this. Would like to know if this is fixed or to whom should we report this to.

 

Thanks

KD

I'm getting a NullPointerException when trying to save a page that references a VF component from a managed package. This seems to have broken since the Summer 09 release. Has anyone else seen this? Does anyone have workarounds?

 

screen shot

Message Edited by james2000 on 06-11-2009 12:27 PM
Message Edited by james2000 on 06-11-2009 12:28 PM

Hi all

 

 I have used this code for my pdf out put.Except Calibri all the fonts works fine.

But if I specify Calibri then the font type changes to default font of pdf or something else.

 

<style>
    body {
            font-family:Calibri;
            font-size:65%;
            }
</style>

Hi,

 

I've created a simple Visualforce page and a simple controller.  I've created a Web tab and pointed it at the page's url.  Clicking on the tab simply gives a list of our org's unread emails related to Cases.   Most times it takes over 30 seconds to load and render, even though it's only returning 20 or so rows at any given time.

 

 

The page:

 

<apex:page controller="emailController" tabstyle="emailmessage" sidebar="true"> <apex:pageBlock > <apex:pageBlockTable value="{!emails}" var="m"> <apex:column headerValue="Case" value="{!m.ParentId}"/> <apex:column headerValue="Closed" value="{!m.Parent.IsClosed}"/> <apex:column headerValue="Received" value="{!m.messagedate}"/> <apex:column headerValue="Owner" value="{!m.Parent.Owner.Name}"/> <apex:column value="{!m.fromaddress}"/> <apex:column value="{!m.toaddress}"/> <apex:column value="{!m.subject}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>

 

 

The controller:

 

 

public class emailController { List<EmailMessage> emails = [select id,ParentId, Parent.Owner.Name,Parent.IsClosed, Parent.ClosedDate,status,fromaddress,toaddress,messagedate,subject from emailMessage where status ='0' order by Parent.IsClosed asc, messagedate desc ]; public List<EmailMessage> getEmails() { return emails; } }

 

What could possibly be causing a 30-second delay on this?  I'm not saying that Salesforce.com performs that fantastically in the best of times for those of us on European instances, but 30 seconds for such a simple page is a little bit absurd. 

 

Any input is greatly appreciated!!

We have lot of visualforce pages and they have stopped working.

 

getting following error:

 

Tag Library supports namespace: http://salesforce.com/standard/components/apex, but no tag was defined for name: sectionHeader

 

they were working yesterday.

 

 

Hi,

 

Anybody come across this error before?

 

"Tag Library supports namespace: http://salesforce.com/standard/components/apex, but no tag was defined for name: form"

 

This appears to have started when our development accounts have been updated to Summer '09. I can't now upload an already created managed package. I have got around this before by creating a new page with EXACTLY the same content as one that doesn't work; the new one works fine.

 

I get this when the existing page has an apex:form tag in it.

 

Thanks for any help.

Rich.

Hi,

 

I am new to salesforce. And am planning to create a hotel management system.

Suppose there are four types of roles: Client, waiters, chefs and managers.

What i want is that whenever a client pays a bill amount greater then a predefines value, a alert should pop-up in front of all logged-in managers. Is this possible? Are there any work arounds for this ?

 

 

I know that email alerts are possible in this scenario. But i would prefer a pop-up alert. 

 

Thanks in advance,

arun. 

Message Edited by arunk on 06-09-2009 05:17 AM

My Visual force page is using custom components created in the same org. Till yesterday the page was working fine but all of sudden today I am getting this error when I open this page.

 

Tag Library supports namespace: http://salesforce.com/standard/components/apex, but no tag was defined for name: attribute

 

 

Another trivial but strange thing thats happening is that, I can't open a component in view mode. On trying to view the component from Setup > Develop > Components. Following salesforce error comes, though we can edit the component :)

 
An internal server error has occurred An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using Salesforce!

Error ID: 299154357-472 (-607383983)

 

I am getting couple of these wierd errors recently, like I get same error on "Run All Tests".

 

Does this means that latest salesforce upgrades are not stable and worth installing ?? I tried removing the custom components, still the error is coming.

 

Please help !

I am using an outputText tag along with a param tag to format a date file.  This works quite well in the sprin'09 release.  I get compile errors in Summer '09.  Here is a simple page that works in spring'09 but gets an error on save in the summer '09 release.

<apex:page >
  <h1>Congratulations</h1>
  This is your new Page
            <apex:outputText value="{0,date, MMMM d', 'yyyy}">
                <apex:param value="{!NOW()}" />
            </apex:outputText>

</apex:page>

 

The error message I get in summer '09 is below.  Does anyone have any idea how to get around this?  I have opened a case on this - the number is 02709898

 

 

Error: The value attribute on <apex:outputText> is not in a valid format. It must be a positive number, and of type Number, Date, Time, or Choice.

 

 

 

 

Error 

 

Message Edited by dchasman on 06-08-2009 01:00 PM

Hello,

 

Just started using apex and VisualForce last week and I'm trying to get some XML data into a dataTable. I'm able to get the XML and parse it using the XmlStreamReader but I keep getting errors when trying to pass it to the dataTable. Here is my code. For now I'm just trying to get text from the usr_conference_id node but eventually I'd like to get the data from the other nodes.

 

The XML (I'm getting a valid XML doc but removed the header for this post):

 

<meeting>

<usr_conference_id>382718</usr_conference_id>

<conference_name>Test Conf.</conference_name>

<conference_user>Test User1</conference_user>

</meeting>

<meeting>

<usr_conference_id>381084</usr_conference_id>

<conference_name>Test Conf. 2</conference_name>

<conference_user>Test User2</conference_user>

</meeting> 

 

 

<apex:page controller="Conferences">

<apex:dataTable value="{!conferencelist}" var="conf">

<apex:column>

<apex:facet name="header">ID</apex:facet>

<apex:outputText value="{!conf.usr_conference_id}"/>

</apex:column>

</apex:dataTable>

</apex:page> 

 

public class Conferences {

 

public class UserConferences {

String usr_conference_id;

String conference_name;

} // End UserConferences

 

UserConferences[] parseXML(XmlStreamReader reader) {

UserConferences[] conferences = new UserConferences[0];

while(reader.hasNext()) {

if (reader.getEventType() == XmlTag.START_ELEMENT) {

if ('usr_conference_id' == reader.getLocalName()) {

reader.next();

UserConferences conference = new UserConferences();

conference.usr_conference_id = reader.getText();

conferences.add(conference);

}

}

}

return conferences;

} // End parseXML()

 

public List<Conferences.UserConferences> getConferenceList() {

Http http = new Http();

HttpRequest req = new HttpRequest();

req.setEndpoint('https:ADDRESS REMOVED');

req.setMethod('GET');

HttpResponse res = http.send(req);

 

// Generate the HTTP response as an XML stream

XmlStreamReader reader = res.getXmlStreamReader();

List<Conferences.UserConferences> conf_return = parseXML(reader);

return conf_return;

}} // End Conferences

 

When I try to save this in the page editor I get the following error:

 

System.Exception: Too many script statements: 200001

 

Class.Conferences.parseXML: line 21, column 13 Class.Conferences.getConferenceList: line 35, column 60 External entry point 

 

 

Any help would be greatly appreciated!

 

Thanks,

Dan 

 

Message Edited by DDay on 06-07-2009 07:22 PM

Hello Friends,

 

My requirement is that, i need to generate an XML out of my VF page. For this, i specified the "ContentType="application/xml" on my page header and then included the DOCTYPE tags to generate a standard XML out of it.

 

But somehow, i am not able to get the XML styling in the generated page and it shows me the shole page elements intead of just showing me the data.

 

Can you please let me know where i am going wrong or is this possible in VF? Pasting my VF page code below:

 

 

<apex:page cache="true" Controller="TestController" contentType="application/xml" showHeader="false">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/html" xml:lang="en" lang="en">
<body>
<apex:form >
<apex:pageblock id="exportDocs">
<apex:pageBlockTable value="{!exportValues}" var="actual">
<apex:column headerValue="Id" value="{!actual.Id}"/>
<apex:column headerValue="Act Name" value="{!actual.Name}"/>
<apex:column headerValue="MType" value="{!actual.A_Type__c}"/>
<apex:column headerValue="Country" value="{!actual.Country__c}"/>
<apex:column headerValue="B" value="{!actual.B__c}"/>
<apex:column headerValue="Actual C" value="{!actual.C__c}"/>
<apex:column headerValue="Actual G" value="{!actual.G__c}"/>
<apex:column headerValue="Actual I" value="{!actual.I__c}"/>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</body>
</html>
</apex:page>

 

Any help/guidance would be highly appreciated!!

 

Many Thanks,

Cool_D

I wrote a basic component that renders data in an HTML tag, which you can pass as an attribute on the component. Ultimately, this will we be much more sophisticated, but I can't even get this working when I put two of the same component on one Visualforce page. The first component renders, but the second appears to be ignored. We're working on a lightweight CMS for Visualforce, so it would not be unrealistic to have multiple instances of the same component rendered multiple "content blocks" into one final page.

 

 

COMPONENT:

 

<apex:component controller="CTRL_COMP_cms_content">
<apex:attribute assignTo="{!wrap}" name="wrap" description="The HTML tag to wrap this component with." type="String" required="false" />

<apex:attribute assignTo="{!text}" name="text" description="The text to put in the tag." type="String" required="false" />

<apex:outputText value="{!output}" escape="false" />
</apex:component>

 

CONTROLLER:

 

public class CTRL_COMP_cms_content {

 

public String wrap {
get {
if(wrap == null) wrap = '';
return wrap;
}
set;
}

public String text {
get {
if(text == null) text = '';
return text;
}
set;
}

public String output {
get {
if(wrap == '') return text;

return '<' + wrap + '>' + text + '</' + wrap + '>';
}
}

public CTRL_COMP_cms_content() {}

}

 

PAGE WITH COMPONENTS:

 

<apex:page id="the-page">
<c:cms_content id="text1" text="First Text" wrap="div"></c:cms_content>
<c:cms_content id="text2" text="Second Text" wrap="div"></c:cms_content>
</apex:page>

 

FINAL RENDERED HTML OUTPUT:

 

<span id="the-page:text1"><div>First Text</div></span>

<span id="the-page:text2"></span>

 

The final HTML output includes the results from the first component and renders the <span> for the second component, but the contents of the second component are never rendered.

 

Help!

 

 

 

Hi,

 

I'm trying to use cookies with a visualforce page. I set the cookie with javascript but when I use System.currentPageReference().getHeaders() the returned map doesn't have a 'Cookie' key. Is this because salesforce strips them before they get to us and if so is there a reason for doing this? 

 

Thanks!

Scott 

I have encountered a strange problem with a visualforce email template. When I preview the template everything seems to be fine. It appears as I expect in the preview window of the salesforce interface, and the test emails that I send to myself via the 'Preview' button arrive without a problem. However, when the approval process rule triggers the email to be sent the only thing that my users are receiving is an email with the subject only...the body of the email is completely blank! I have yet to figure out why this is, so if anybody has any suggestions I would be very grateful.
Code:
<messaging:emailTemplate subject="New Web-to-Trial Request requires your Approval" recipientType="User" relatedToType="Opportunity">
<messaging:htmlEmailBody >
   <html>
     <body>
    
    <style type="text/css">
      p.regular {font-family: arial; size: 8pt;}
      p.small {font-family: arial; size 8pt; line-height: 100%}
    </style>  
    <p class="regular">
    <br>A New Trial Request has been submitted.</br>
    <br>Account: <apex:outputLabel >{!relatedTo.Account.Name}</apex:outputLabel></br>
    <br><apex:outputText >Requested By: {!relatedTo.Contact__r.Name}</apex:outputText></br> 
     <br>To approve, simply type 'Approved' in your response. You can also review the Opportunity or Approve online at https://emea.salesforce.com/{!relatedTo.Id}</br>
     </p>
     </body>
   </html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 


Message Edited by AKall on 01-16-2009 01:26 PM
Is there some filtering going on before HTTP headers are passed to my controller?

I'm trying to pull the Cookie header out, but it never appears as a key in System.currentPageReference().getHeaders() map. I see lots of other headers there, but no cookies.

As it stands, to write a cookie-aware app I need to do it all in Javascript. (Write the cookie, read the cookie and post back to VF for the cookie's state to become part of the page state). Not ideal.

Thanks for any help.