• dbelwood
  • NEWBIE
  • 0 Points
  • Member since 2006

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

Hello,

 

I've got a selectcheckboxes component on a VF page;

<apex:pageBlockSection title="Product" columns="2">

<apex:pageBlockSectionItem >

<apex:outputText value="{!$ObjectType.Household_Search__c.fields.PolicyType__c.label}"/>

<apex:selectCheckboxes value="{!policyTypes}" layout="pageDirection">

<apex:selectOptions value="{!policyTypeOptions}"/>

</apex:selectCheckboxes>

</apex:pageBlockSectionItem>

 

And the  associated controller;

 

// Multi-select search properties

public List<String> policyTypes {get;set;}

public List<SelectOption> policyTypeOptions {get{return getOptions(Household_Search__c.PolicyType__c.getDescribe());}}

 

private List<SelectOption> getOptions(Schema.DescribeFieldResult f) {

List<SelectOption> options = new List<SelectOption>();

for (Schema.PicklistEntry entry : f.getPicklistValues()) {

options.add(new SelectOption(entry.getLabel(), entry.getValue()));

}

return options;

}

 

When I save the page, I'm receiving the following error; 

Conversion Error setting value 'AUTO LIFE' for '#{policyTypes}'.
  

 

 

Any ideas?

 

Many thanks,

Dan 

 

 


 

I've got a multi-step 1 page wizard and and an apex:pageMesages tag to display messages to the user.  When I add a confirm message on an action, I also get a Warning message in the tag stating  - "The reference to entity 'body' should end with ';' delimiter at line 7".

Any ideas?

Dan
Hi All,

Quick question, though I think I know the answer.  I've got a quite complex apex method running as a result of being called from a VF command button.  During this method I insert and update several records.  At the end I am trying to generate html and plain text representations of VF pages to persist to an SObject that can then be picked up by a custom C# app and posted via SMTP.  This seems relatively straightforward, but I'm guessing that PageReference.getContent() runs in a separate execution context, so won't have access to data inserted in another context.

Question 1, if I call PageReference.getContent() from within an Apex method, does it run in a separate context and thus not have access to the DML changes in the current context?

Question 2, if 1 is true, is there any way to accomplish this?  I've tried persisting SObject-based parameters, but this is just the same thing as above, really.

Hope this makes sense and appreciate any help anyone can offer.

Best regards,
Dan
I've got a multi-step 1 page wizard and and an apex:pageMesages tag to display messages to the user.  When I add a confirm message on an action, I also get a Warning message in the tag stating  - "The reference to entity 'body' should end with ';' delimiter at line 7".

Any ideas?

Dan
Hi All,

Quick question, though I think I know the answer.  I've got a quite complex apex method running as a result of being called from a VF command button.  During this method I insert and update several records.  At the end I am trying to generate html and plain text representations of VF pages to persist to an SObject that can then be picked up by a custom C# app and posted via SMTP.  This seems relatively straightforward, but I'm guessing that PageReference.getContent() runs in a separate execution context, so won't have access to data inserted in another context.

Question 1, if I call PageReference.getContent() from within an Apex method, does it run in a separate context and thus not have access to the DML changes in the current context?

Question 2, if 1 is true, is there any way to accomplish this?  I've tried persisting SObject-based parameters, but this is just the same thing as above, really.

Hope this makes sense and appreciate any help anyone can offer.

Best regards,
Dan
Anyone out there ever do anything with processing the data in an email attachment.
Here is my scenario:  We want to create an inbound email service that receives emails from our old system, including a CSV file as an attachment.  The CSV file contains new and updated opportunity records.  I would like to be able to read the file out of the email, and process the records, doing validation and upserting them to the database.

Anyone???

Thanks in advance!
  • November 07, 2008
  • Like
  • 0
I extended the Flex sample app to populate a DataGrid with the Id and Name of Attachment objects from Salesforce.

However, I've encountered an issue where if I attempt to put the Id and Name in the same row in the DataGrid, it fails. However, if the Id and Name are on separate rows (two separate ArrayCollection.addItem statements) then it works. This happens with any query where I bring back multiple fields and attempt to show them in the same row in the DataGrid.

Here's a snippet of the relevant code that does not work:
  private function render():void{

apex.query("Select Id, Name FROM Attachment",
new AsyncResponder(
function(qr:QueryResult):void{
var ar:ArrayCollection = new ArrayCollection();

for (var j:int=0;j<qr.records.length;j++) {
ar.addItem( {Id:qr.records[j].Id}, {Filename:qr.records[j].Name} );
}

bg.columns = [new DataGridColumn('Id'), new DataGridColumn('Filename')];
bg.dataProvider = ar;

},
function (fault:Object):void{

}
));
}

However, the following code does work:
  private function render():void{

apex.query("Select Id, Name FROM Attachment",
new AsyncResponder(
function(qr:QueryResult):void{
var ar:ArrayCollection = new ArrayCollection();

for (var j:int=0;j<qr.records.length;j++) {
ar.addItem( {Id:qr.records[j].Id} );
ar.addItem( {Filename:qr.records[j].Name} );
}

bg.columns = [new DataGridColumn('Id'), new DataGridColumn('Filename')];
bg.dataProvider = ar;

},
function (fault:Object):void{

}
));
}