• MRietveld
  • NEWBIE
  • 5 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

Hi all, 

 

I want to use the approval-by-email  functionality on an approval process that I have created. When I kick this approval process of via the standard Salesforce user interface (meaning, I have the submit for approval button included in the page layout), it all works well. The approver receives an email with the reply-to field filled with a salesforce email address. 

 

But, there are reasons why I cannot start this approval by using the button in the page. Instead, I had to create a button in the page that calls an VF page. In the constructor of the controller for that page I kick off the approval process (for code see below). This works perfectly well. 

 

But, If the approval process is started this with (via apex) the email notification that is sent out does NOT have the reply-to field filled with a salesforce address, and consequently, replying to this email does not approve or reject the object. 

 

Does anybody have an idea how to solve this?

 

thanks, 

 

 

// Create an approval request for the Object           

Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();

req1.setComments('Submitting request for approval.');

req1.setObjectId(sow.id);

 

// Submit the approval request           

try{               

    Approval.ProcessResult result = Approval.process(req1);             

    ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'This Object has been succesfully submitted for approval'));                    

}               

 

catch (Exception e) {

    ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR, e.getMessage()));            }

 

Have an approval process that works fine via email from Outlook, webmail and iPhone but for one Android phone approver, when he replies, it selects the contact from the workflow and not the approval reply to email address. Is anyone else seeing this and if so, did you find a way around it?

Yes, they can hit the link and log in AND yes they can use their PC

But if they are in a meeting and see the request and just need to hit reply and type Approved, just like they did on their iPhone, all is right with the world.

I am a bit of a beginner at formulas, so hopefully one of you will think this is easy, and be able to help. :-)

 

Customer requirement:

 

Create a formula field that displays the Week Number (as Week 1, Week 2, etc), based on the Date entered on a particular record (same object).

 

Ex: 01/01/09 - 01/04/09 would return a value of "Week 1"  

01/05/09 - 01/11/09 = Week 2

01/12/09 - 01/18/09 = Week 3

 

and so on.....

 

Is using the CASE function the way to go, and if so, what's the shortest way to create this formula?

 

Thank you in advance!

S

 

  • April 20, 2009
  • Like
  • 0
Hi everyone,

I have to build a table that represents an activity summary for a month. That is, I have up to 31 columns for each days in the month and a dozen lines for each type of activity, and for each line and column I have an input field.
Is that possible generate dynamically the column on page load ?

I would like to avoid copying/pasting 31 times the same column and also I would like to avoid creating an accessor method for each column.

It brings my second question : is that possible, in an visualforce "{! }" markup to call methods of the controller by passing the method one or more parameter ?

For example, I'd like a method valueForColumn(Integer index) that returns the value of the column "index" and put one column on my VF page that will be reproduced as much as I need with the value changing depending on the index of the column.

Thanks in advance.