I'm uploading an attachment via "sforce" following the example here:
Upload attachment in VisualForce without reloading the whole page
However I'm having problems getting a value for ParentId. I first tried to instantiate a new custom object in my controller constructor like this:
public Custom_object__c attachmentParent {get; set;}
public MyControllerConstructor() {
attachmentParent = new Custom_object__c(Name="temp");
insert attachmentParent;
}
But when I'm in the visualforce page and I try to set the parentId field to {!attachmentParent.Id} it comes back blank. How am I supposed to do this?