Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [approval-process]

An approval process is configured on an object to specify all of the steps, users, actions, and relationships among them involved in approving or rejecting a record of that object. Approval processes can become very complex and tools such as the Process Visualizer can be used to aide in understanding them.

Filter by
Sorted by
Tagged with
1
vote
1answer
1k views

difference between Process builder's submit for approval and Approval processes

Can you please explain me what is the difference between Process builder's submit for approval and Approval processes? If a record is submitted through process builder, to whom it will be assigned for ...
1
vote
2answers
92 views

Approval process request

How to send the approval request to an email field? Requirement is: When the criteria meets, an approval email will be send to the email field not any user, group or related user.
0
votes
0answers
162 views

Building Applications with Force.com - Part 2 || Automating Business Processes with Approval Processes

LINK TO PREMIER SUPPORT HELP TUTORIAL (see Building Applications with Force.com - Part 2, Lesson : Automating Business Processes with Approval Processes) CLICK HERE LINK TO EXERCISE GUIDE (see "13-...
1
vote
1answer
133 views

Error message on Apex trigger that gets triggered from an approval process

I have a master object and a child object (which shares a M/D relationship). The child object is nothing but a bunch of transaction records. I have an approval process defined on the master object and ...
5
votes
1answer
631 views

Approval process within a VF page in lightning experience does not work

I have a VisualForce page working fine in SF Classic that contains the approval process related list with this code: <apex:relatedList list="ProcessSteps" pageSize="3" /> When I switch to ...
0
votes
1answer
161 views

Approval Process: other than the system admins, can I set one non-admin user to unlock the record?

In our current approval process, once the user sends the record through to intial approval, the record is locked. There are limited times when the record needs to be unlocked and we'd like an end user ...
3
votes
2answers
307 views

Check isEmpty OR Catch ListException?

My basic question is if it is better to use a try/catch block or an isEmpty check when returning the first element in a list. For example: return myList.isEmpty() ? null : myList[0]; // OR try { ...
2
votes
1answer
991 views

Are approval requests that are submitted to queues distributed or shared among the users of the queue?

I'm trying to create an approval process using a pool of users as approvers, but I don't know the full mechanics of Queues. When a document is submitted to a queue for an approval, does that document ...
0
votes
1answer
33 views

How select users who submit for approval

How can I get user id of ProcessInstance object, user who submit object for approval in approval process?
0
votes
1answer
1k views

Edit standard email notification for approval process

I need to add an email address as CC when the standard email for approval process is sent at Submit for Approval. Is there any way to do it ?
2
votes
1answer
2k views

How to unit test query ProcessInstanceWorkItem without a defined approval process

I'm trying to unit test the class below, which does against the ProcessInstanceWorkitem table to find all pending approvals for an sobject (given by name in the method call). The class is rather ...
0
votes
1answer
43 views

How to set certain Opportunity fileds to NOT be editable during the approval process including inline editing [closed]

In my Salesforce there is a Submit for approval process for the Opportunity object. I want certain fields in the Opportunity record to NOT be editable during the approval process. In order to achieve ...
0
votes
1answer
98 views

How to find in Salesforce that the Oppotunity is in submit for approval process?

I need to know what is the criteria and how to find that particular Opportunity object is in approval process? I presume that some of Opportunity fields is changed. Which is that field and how can I ...
4
votes
2answers
641 views

Ordering approval process history items by CreatedDate DESC doesn't give the correct order of execution

It seems to be a quirk of ordering SOQL queries by CreatedDate that, if the records were created in the same second, the order returned by the SOQL query doesn't reflect the order of execution, as ...
1
vote
1answer
47 views

Single record query based on related

I want to find a single (any) user who has an approval assigned to them. I can't seem to find the right search term. User U = [select id from User (select actorid from processInstanceWorkItem) limit ...
2
votes
3answers
386 views

Didn't understand relationship 'ProcessInstanceId' in field path

How come I can compile a query on workitem to return processinstanceID but the related targetobjectid (and then of course the targetobjectid.name ) return the error: Edit - sorry I wasn't clear but ...
1
vote
1answer
268 views

Custom unlock button visibility during opportunity approval process

I have crated my own custom button which programmatically unlock the Opportunity record and make changes in the mapping between users and permission sets. The issue here is that my custom button is ...
0
votes
1answer
82 views

How can I exclude weekends from an approval process instance report?

I have an Approval Process Instance report which tells me the amount of time (Elapsed Days, Hours, Minutes, etc..) between when an approval instance was submitted and when it was completed. Is it ...
0
votes
0answers
216 views

Getting boolean value as false for Approval.islocked(id)

I am using below in my trigger.I can see lock on the record and when i try to edit it then it says locked.I am getting boolean value as false for Approval.islocked.Any suggesstion for locking record ...
0
votes
1answer
132 views

submit for approval button on standard task object

Why there is no standard Submit for approval button in Task Object. How to create custom Submit for approval button and relate it to Approval process?
1
vote
0answers
250 views

How to change approval request post on record chatter feeds?

I have an Approval Process on Account. Every time I submitted for approval, there will be an approval post on Account's chatter feed like below. My question is, how to change the content of the post ...
0
votes
2answers
2k views

How can a trigger be written so that it fires when a record is approved?

Can a record change be detected so that a trigger will ONLY fire once a record has been approved?
0
votes
1answer
469 views

Roll back data on a record if rejected via approval process

Is there a way to roll back the changes (data) if the record is rejected by the approver using standard approval process in salesforce? I've checked and it seems there is no OOB to do this. Is trigger ...
0
votes
0answers
295 views

Approval process that does field update will not start the process builder: Looking for alternative

As listed in other posts, I see many people have this issue, where an approval process is to do a field update and then expect that update to start a flow. I'm in the same boat. Are there any ...
0
votes
1answer
636 views

get approver name

I have an approval process which approves records based on some criteria in opportunity object. So I designed a visualforce component having a controller and I called the component in visualforce ...
1
vote
1answer
491 views

Approval Process comments field validation and pass comments to object

I amrying to pass comments and validate it if approver rejects then he should give some comments from before update trigger but everytime comments comes null therefore even i give some comments ...
0
votes
1answer
130 views

test class code coverage problem approval process with processs instance workitems

in below test class is not covering the BatchSendEmailAlerts8 code guide me where i am wrong...not covering part: mailIdsMap.put(PIobj.ProcessInstance.TargetObjectId,PIobj.actor.email); and ...
0
votes
1answer
1k views

Select group of users in approval process

I want to create approval process in which I send mail request to group of users depending on submitter. For example if submitter is assigned a territory or organization unit (an object in our app), ...
-1
votes
1answer
50 views

How to set certain Opportinity fields to remain locked during the Submit for Approval process [closed]

I need to be able to have certain Opportunity fields to remain locked during the Approval process? There are few Opportunity custom fields which I need to keep locked during the Submit for Approval ...
0
votes
1answer
39 views

Unable to create report on approvals in sfdc

Hi friends i have a standard approval process in account.And in some scenarios the accounts submitted for approval multiple times.So, my requirement is to create a report for approvals in account.So, ...
2
votes
0answers
321 views

Change Actual Approver value of an approval process from apex

I have Visualforce page hosted on the force.com site. The user (or an approver) can approve/reject the request of certain custom object records using this page. The page shows him a comment box and ...
3
votes
0answers
212 views

Automate Approval Step to be approved, not skipped

We're currently tracking internal requests in Salesforce via Cases. For a certain kind of request, we want to run it by the managers of 3 teams to see if what's being requested would be applicable to ...
2
votes
2answers
4k views

Approval Process Assignment Email Alert Not Sending

I'm having difficulty figuring out why this approval process isn't sending an email to the approver. Here are the details on the process: Active: Yes Next Automated Approver Determined By: (this is ...
0
votes
1answer
478 views

Approval Process Multiple Approvers

We have 4 approval steps based on a multi-select picklist. Step 1 If multi-select picklist = (A OR B) OR (A & B) Will go to Approver 1 Step 2 If multi-select picklist = (C OR D OR E) OR (C & ...
3
votes
0answers
40 views

How to check which criterias are not met while submitting for Approval? [duplicate]

When we try to submit an record for approval, it shows the criteria are not met, but it doesn't show which criterias are not met. How can we find which criteria are not met by the particular end user ...
2
votes
0answers
57 views

QUOTE APPROVAL PROCESS ERROR _ ClassCastException

I found the follow error when a user tries to approve a quote using Salesforce1 app and sending an approval email (quote approval email is correct and approval process is well configured in sfdc org): ...
0
votes
1answer
2k views

Create approval history report with object fields?

I have standard approval process in opportunity. I want to create a report on approval process with opportunity. I created a new report type with process instance and process instance node, but I ...
1
vote
1answer
340 views

Required comments field in ProcessInstanceWorkitemWizardStageManager

How do I enforce the comments is required field before the user approve/reject the request? Below is my screen shot of the page.
1
vote
2answers
1k views

Process Builder works only when the record is being edited,Initial Creation throws error

We have a process builder which auto approves a quote based on a specific approval process with a criteria defined as discountpercent__c > 2.Wherein the field discountpercent__c is a rollup summary ...
2
votes
1answer
247 views

Why does ProcessInstanceNode not appear in the Entity Relationship Diagram?

In the following linked image is the Salesforce ERD for Process objects: However I can't understand why I can use the following subquery to get a "invisible" child object for process: [select Id, ...
0
votes
1answer
345 views

Is it possible to auto submit the approval once the filter citeria is met?

We have a new approval process with filter criteria set as opportunity discount greater than or equal to 2.0,Only then the submitter is allowed to submit the approval.Is it possible to auto submit the ...
0
votes
1answer
241 views

Trigger Approval Process

I created an Approval Process but I'm not aware how to trigger such approval process. What I would like to know is how to trigger the Approval Process when Opportunity stage = 'Proposal Submitted for ...
1
vote
1answer
278 views

Unlock opportunity object during approval process [closed]

I have an approval process for Opportunity object. In the beginning of the approval process the Opportunity is locked and in the end the Opportunity object is unlocked. What I want to achieve is the ...
3
votes
1answer
42 views

Internal Server Error (gack) Submit for Approval - VF Email Templates

Use Case: Approval Process on custom object Approval Assignment Email Template: Visualforce User clicks Submit for Approval, SFDC responds with Internal Server Error. Question will be self-...
1
vote
0answers
1k views

Changing approval process approvers via Apex

I'm trying to change the approvers for an approval process via Apex. Ideally I want to dynamically set 2 unanimous approvers through code, but I can't figure it out. I have the following code: ...
0
votes
1answer
31 views

Replacing an Approval step with an email alert

I have an existing five-step approval process on a Quote object, where the first step is Manager approval for various discounting or exception scenarios. I want to remove this first approval step (and ...
0
votes
1answer
282 views

How to Query the “Assigned To” field form Proces Instance

I want to query the "Assigned To" field from Proces Instance. How can i get the "Assigned To" field from Approval Process. Actually I have to list out all Approval process which is assigned to ...
0
votes
2answers
47 views

How do you loop through the User object to then update a custom field on the Account record that the flow was launched on

I have a VWF that begins is launched through a custom button on an Account record. There is a screen input element where an end user inputs a value. I need to know how to loop through all of the User ...
1
vote
1answer
147 views

Post approval action on Knowledge articles

I have a business requirement as follows: When a knowledge article gets approved, the article title, subject and article link to be posted on chatter and will be available to specific group(s). I ...
1
vote
1answer
644 views

Approve and unlock a record after some time

I have a scenario where I have to auto approve a record 30 min(say) after submitting the approval and the record should be unlocked. I planned to do this by using workflow rule and a trigger ...