• kpr1
  • NEWBIE
  • 0 Points
  • Member since 2009

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

When a user logs in, in his home tab, 'Items to be Approved' contains all the records that need approval from this user. Where is this information stored?I looked in user and Approval objects and didn't seem to find any field that stores the relation---this user has these records to be approved

 

The use case is this:

 

I have an approval on opportunity, where in the manager has to approve the salesprice of opportunity line items.

 

When the manager logs in, I provide a custom button from the opportunity detail page, which opens up a visualforce page from where he can see only those products that need approval. He then approves or rejects the pricing using this page. After that he has to come to the home page and click the link for the opportunity record under 'Items to be Approved' and click Approve or Reject button.

 

This works fine if he has only one record to be approved. But if there are multiple opportunity records to be approved, the manager would have a hard time going back and forth between the opportunity detail pages and the home page.

 

So I was trying to access the approval process from the visualforce controller itself, so that I could write code to Approve/Reject the request from teh visualforce page itself, instead of coming back to the home page. To do that, I need to access the approval requests associated with a user.

 

 

Can anyone help me this please?

 

Thanks in advance,

kpr

  • September 15, 2009
  • Like
  • 0

Hi,

 

I have an approval process on Opportunity object. I am using Apex in a visualforce controller "controller1" to sumbit the record for approval. 

 

I have another visualforce page "page2" which needs to be displayed to the manager for approval. Is there any way I can get a handle on the approval process that was  submitted in "controller1"?

 

(I was thinking of using the same controller for both the pages and getting the approval request to process. But the submittal for approval and the actual approval take place at different times and I don't know if the controller would be running in memory all the time?)

 

Any help appreciated!

 

Thanks in advance

 

Prashanth

  • September 14, 2009
  • Like
  • 0

When a user logs in, in his home tab, 'Items to be Approved' contains all the records that need approval from this user. Where is this information stored?I looked in user and Approval objects and didn't seem to find any field that stores the relation---this user has these records to be approved

 

The use case is this:

 

I have an approval on opportunity, where in the manager has to approve the salesprice of opportunity line items.

 

When the manager logs in, I provide a custom button from the opportunity detail page, which opens up a visualforce page from where he can see only those products that need approval. He then approves or rejects the pricing using this page. After that he has to come to the home page and click the link for the opportunity record under 'Items to be Approved' and click Approve or Reject button.

 

This works fine if he has only one record to be approved. But if there are multiple opportunity records to be approved, the manager would have a hard time going back and forth between the opportunity detail pages and the home page.

 

So I was trying to access the approval process from the visualforce controller itself, so that I could write code to Approve/Reject the request from teh visualforce page itself, instead of coming back to the home page. To do that, I need to access the approval requests associated with a user.

 

 

Can anyone help me this please?

 

Thanks in advance,

kpr

  • September 15, 2009
  • Like
  • 0