• REstapp123
  • NEWBIE
  • 24 Points
  • Member since 2009

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

Hi, I'm creating a Salesforce application for a group project in a course I'm currently in and I'm so close to completing it but I can't figure out a few things! The final portion of our project is something we wanted to put the extra effort in: allowing users to upload images and displaying those uploads in a related list on a detail page. So far so good. The problem is that I can't seem to get the IMG() function to work but I think it may be a coding issue.

 

Firstly, I have a Visualforce page that allows the User to browse for an image and upload it into their hidden Documents Tab. Note: I am developing in Eclipse. The controller class takes the URL of the new Document and stores into a URL field of a custom object:

 

//all required field entries

myDocument.isPublic = true;

 

insert myDocument;
        
Gallery__c myGallery = new Gallery__c();
myGallery.Image__c = myDocument.Url;
insert myGallery;

 

In the custom object, the URL value is plugged into the following formula field:

 

 HYPERLINK( Image__c , IMAGE(Image__c, "Uploaded Image", 100, 75) )

 

When I test it all out, instead of getting a resized image that is anchored, I get a text link with the alt "Uploaded Image".

 

1. What URL does the Document.Url value return? Is it the full document url?

 

2. I know that 'Externally Available Image' must be activated. Eclipse didn't list any fields similar to isExternallyAvailable so I assumed isPublic is the API equivalent. Are they not the same thing?

 

3.  Are image displays within another formula function allowed?

 

Thanks!

Message Edited by REstapp123 on 10-14-2009 01:52 AM

Hi, I'm creating a Salesforce application for a group project in a course I'm currently in and I'm so close to completing it but I can't figure out a few things! The final portion of our project is something we wanted to put the extra effort in: allowing users to upload images and displaying those uploads in a related list on a detail page. So far so good. The problem is that I can't seem to get the IMG() function to work but I think it may be a coding issue.

 

Firstly, I have a Visualforce page that allows the User to browse for an image and upload it into their hidden Documents Tab. Note: I am developing in Eclipse. The controller class takes the URL of the new Document and stores into a URL field of a custom object:

 

//all required field entries

myDocument.isPublic = true;

 

insert myDocument;
        
Gallery__c myGallery = new Gallery__c();
myGallery.Image__c = myDocument.Url;
insert myGallery;

 

In the custom object, the URL value is plugged into the following formula field:

 

 HYPERLINK( Image__c , IMAGE(Image__c, "Uploaded Image", 100, 75) )

 

When I test it all out, instead of getting a resized image that is anchored, I get a text link with the alt "Uploaded Image".

 

1. What URL does the Document.Url value return? Is it the full document url?

 

2. I know that 'Externally Available Image' must be activated. Eclipse didn't list any fields similar to isExternallyAvailable so I assumed isPublic is the API equivalent. Are they not the same thing?

 

3.  Are image displays within another formula function allowed?

 

Thanks!

Message Edited by REstapp123 on 10-14-2009 01:52 AM
So I never thought I would be hitting this limit but here I am. I did a search on this and nothing came up so it looks like I'm one of the few to hit this limit.

Maximum view state size limit (128K) exceeded. Actual viewstate size for this page was 174.281K.

Hmm. So what can I do to measure this and control it. Is there any field I can output to monitor what my viewstate while developing?

Thanks,
Jason




Message Edited by TehNrd on 08-26-2008 03:03 PM
  • August 26, 2008
  • Like
  • 0