• Yonathan
  • NEWBIE
  • 0 Points
  • Member since 2008

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

Hi all,

 

Here is my code :

 

public void sendEmail(string attach,string body) { Blob fileBody = Blob.valueOf(attach); Messaging.EmailFileAttachment[] fileAttachments = new Messaging.EmailFileAttachment[1]; Messaging.EmailFileAttachment fileAttachment = new Messaging.EmailFileAttachment(); fileAttachment.setBody(fileBody); fileAttachment.setFileName('users.xml'); fileAttachments[0] = fileAttachment; Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); ... mail.setPlainTextBody(body); mail.setFileAttachments(fileAttachments); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); }

 

 

Is it possible to programmatically create and compress a file to be attached in email ?

Hi all,

 

I have a Visualforce page with a commandbutton.

 

If I click on my button, the page is refreshed.

Then, I click again on my button: the page is refreshed again.

Then, I click on the IE Back button and I get the following error message "Webpage has expired".

 

 

Here is my VF Page:

 

<apex:page controller="testBack"> <apex:form > <apex:commandlink action="{!MyClick}" value="Click Me" /> </apex:form> </apex:page>

 Here is my Ctrl:

 

public class testBack { public PageReference MyClick() { //do something return null; } }

 

Any workaround for this problem?

 

 

 

Hi all,

 

I want to add a header to a Single Email Message.

Any help is welcome !

 

Yonathan

 

 

Hi all,

I would like to create table columns dynamically.
The object is known (i.e Account) but the field list is dynamic.I can add or remove field from the list.
So I need a mechanism that will allow me to render fields, and create my table dynamically.

Here is my Page code :

Code:
<apex:repeat value="{!Accounts}" var ="Account"> 

<apex:outputText value="{!Account.?????????}" /><br/>
</apex:repeat>
 


Any Idea ?
Hi all,

I'd like to dynamically  render an Sobject to a VF page.

Here is my controller:

Code:
private list<SObject> obj;

public void setobj(list<SObject> s){obj=s;} public list<Sobject> getobj(){return obj;}
public PageReference init() {
 obj=[select Name from Account limit 10]; return null; }

Here my VF Page:

Code:
<apex:page Controller="Test" action="{!init}">
<apex:form>
<apex:repeat value="{!obj}" var="field">
   <apex:inputField value="{!field.Name}"/>
</apex:repeat>
</apex:form>
</apex:page>

I've got this error message :
Read access not found for null.
I've also tried with outputText, inputText with no success.The only field I've managed to retrieve is the ID.

Any Idea ?