You need to sign in to do that
Don't have an account?
ahsens
Approval Requests for Opportunities
Hi All!
I want to know that can we associate the approval requests with opportunities ? Means that some one can request for approval against opportunity instead of a contract ?
Best Regards
Ahsen Saeed
I built a demo like this recently.
- Are you using Extended Edition? If you are then workflow can provide an approval process.
Account manager (AM) creates a new opportunity, moves it to stage pending approval. This automatically triggers a new alert/task to be assigned to the account managers boss (the sales director for example).
Sales director (SD) receives alert/task notification, clicks on link to opportunity. Trick here is that SD uses a profile that shows him the opportunity page with a big Approve Image button on it that when clicked edits the opportunity, changes the stage and saves it one click. Image button changes when the stage changes to show Approved.
Workflow notifies the AM when the opportunity is approved.
There are some screenshots that show what I mean:
http://www.seforce.net/ihargreaves/IH%20-%20Opportunity%20Approval.ppt
Ian.
Hi Ian,
Great demo, how bout sharing some basic code please?
Ian, can you provide any more info?
Thanks
The workflow to notify your manager is 'standard' ..
The rule reads as: (screen scraped from the rule definition in the app)
Rule Name Opportunity authorisation Rule Type Opportunity
Active Trigger Type On Record Create or Edit, Trigger Criteria Previously Not Met
Description Opp at level a,b,c,d,e needs authorisation from assigned role
Rule Criteria [Opportunity : Stage equals Pending]
Define the actions to take when a record meets the workflow rule criteria.
Workflow Tasks automatically create tasks for the specified users.
Workflow Alerts send email notifications to the specified recipients.
Workflow Tasks Workflow Tasks Help
Action Subject Due Date Status Priority Notify Assignee Assigned To
Edit | Remove New task assigned to you: authorisation required Rule Trigger Date + 1 days Not Started Normal Authorisation
Workflow Alerts Workflow Alerts Help
Action Description Email Template
Edit | Remove Authorisation Alert Authorisation required
The image field uses weblinks to manage the state of the button and the update of the opportunity. As mentioned this is for demo use - for production you should use an s-control (this should prevent new windows being created - which hyperlink formula fields always create)
HYPERLINK( "/" & {!Id} &"/e?retURL=%2F" & {!Id} & "%3FsrPos%3D2%26srKp%3D006" & "&opp11=Active&save=1&CF00N20000000sIuN=Guy Smith&00N20000000sIu3=" & TEXT(DAY(TODAY())) & "/" & TEXT(MONTH(TODAY())) & "/" & TEXT(YEAR(TODAY())),
IMAGE(IF(ISPICKVAL({!StageName} , "Pending"),
"/servlet/servlet.ImageServer?oid=00D200000000qUo&id=015200000006V4A",
"/servlet/servlet.ImageServer?oid=00D200000000qUo&id=015200000006V4K"), "Approval status")
So in the above example, Guy Smith is the approver, and I've hard coded his name as the approver in the weblink - this should really get the users name using {!user_name} - except this field is not available in weblink. Again this would be fixed using an s-control. Another problem with this weblink is that the link is still active even when the button has been pressed once - you should change the hyperlink to be null if the stagename is not pending.
Please don't ask me for the s-control - I haven't got the time at the moment.
You need to add another workflow rule to notify the opportunity owner that the authorisation has taken place.
Hope this helps.
Ian.
I can share the development work done by my colleague Chris.
First of all the disclaimers: this is provided as-is, and is unsupported. You use this at your own risk.
Chris' notes:
Below is a link to an Approval Process custom app that is now published on the exchange (privately, no password).
http://www.salesforce.com/appexchange/detail_overview.jsp?id=a0330000001oSIKAA2
This app can be adopted to "approve" or "reject" and custom or standard object.
When creating an Approval Request, the user is prompted with a User Lookup to assign the Request. This could be removed, however, and you could use workflow to notify the recipient. During this assignment step, the user can also add comments, justifying the Request.
If you're interested, please deploy the app in one of your demo orgs and let me know what you think.
There is a test drive available. I will work on a more detailed deployment doc in the coming days.
The pop-up windows include a somewhat annoying resizing "feature" due to the current inability to include window properties when launching scontrols from image fields. I believe this will be addressed in a future release. You can remove this resizing if desired.
It contains:
Custom Object
Name: CustomObject - This object exists merely so you can test the workflow and design. You would replace this object with your own object that requires approval. You will also need to change references to this object in the scontrols to reflect which object you need to approve.
Custom Object
Name: Approval Request
Document
Name: Approve Button
Document
Name: Reject Button
Document
Name: Submit Button
S-Control
Name: RejectApprovalRequest
S-Control
Name: ApproveApprovalRequest
S-Control
Name: CreateApprovalRequest.htm
Custom Link
Name: Request Approval
Description: Custom Link to a Custom S-Control
It may be asking a lot, but is there any way the variables can be explained? I need to know which ones to changed and there seems to be some that are not related to anything that I can see.