• Varun Vatsa
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
The majority of my VF page is built dynamically with jQuery. I'm looking to upload some attachments, I can accomplish this with inputFile, but I can't use any apex elements because everything else on the page is made with jQuery, body, tables etc...

So can I replace

    <apex:inputFile value="{!attachment.body}" filename="{!attachment.name}" id="file" title="Upload Attachment" styleclass="fileType"/> 

with this
   
<input type="file" value="{!attachment.body}" name="{!attachment.name}" id="file" accept="image/jpeg, image/png"> </input>


     
The majority of my VF page is built dynamically with jQuery. I'm looking to upload some attachments, I can accomplish this with inputFile, but I can't use any apex elements because everything else on the page is made with jQuery, body, tables etc...

So can I replace

    <apex:inputFile value="{!attachment.body}" filename="{!attachment.name}" id="file" title="Upload Attachment" styleclass="fileType"/> 

with this
   
<input type="file" value="{!attachment.body}" name="{!attachment.name}" id="file" accept="image/jpeg, image/png"> </input>


     
Good afternoon,

I'm looking to create a button on a custom object that updates the owner and status of the record on the object (Sales_Order__c).  So on button click, the owner changes to a specific queue, and the status updates to "Sales Order Submitted".  What i have below so far:


{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}

var sor = new sforce.SObject("Sales_Order__c");

sor.Id = '{!Sales_Order__c.Id}';
sor.OwnerId = '00Ge0000000XKF0';
sor.Status__c = "Sales Order Submitted";
var result = sforce.connection.update([sor]);
window.location.reload();

but when i click the button, nothing happens.  Can someone take a look and let me know where i went wrong (no error message, screen just refreshes but changes aren't made).