• sharma_ffdc
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
Currently, to approve any salesforce record through email, you have to reply to approval email using Approved/Yes and it gets approve.

I just want to skip the step of writing "Approved/Yes" for approving records. Instead of this, I would like to create a HTML template and provide some button or link into that. When user will click the button or link, then it should approve that salesforce record ( make sure that button or link doesn't open a new salesforce window).

I don't know whether it's achievable or not, but I would like some positive response for this problem. Can anyone please suggest something ?
I am trying below code to get the element using elementId but alert message is showing null value. Can anyone please suggest why it is behaving like this :

<apex:page standardController="Account">
  <apex:form >
      <apex:inputField value="{!Account.name}" id="accName"/>
      <apex:commandButton value="Test" onclick="testFunction(); return false;"/>
  </apex:form>
  <script>
  function testFunction(){
      alert(document.getElementById('{!$Component.accName}'));
  }
  </script>
</apex:page>

I have a scenario that approvers can approve the records through email, but they should not 'Reject' through email.

Is it possible to achieve this through standard salesforce functionality? or any other alternative is there?

 

Thanks,