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
0
votes
1answer
26 views

Invalid type: StepsAndWorkitems

Please help me with this. In the second for loop this error is coming Map<Id,ProcessInstance> processinstence = New Map<Id,ProcessInstance>([SELECT Id, Status, (SELECT ID, ...
0
votes
0answers
12 views

Automatically assign new users to approval process

I have a requirement where i want to assign new users who has the access to read/edit the opportunity records to initial submitters in approval process. So, that the new user can submit opportunity ...
1
vote
0answers
15 views

Where does advanced approvals do field updates

In the normal approval process there is an approval action section which we can have field updates. But when I read through the advanced approval process I don't find a place to have this. May I know ...
0
votes
0answers
20 views

How can assign I Approval Requests to a queue when the original approver is away from office / on leave?

Two parts to this question: How can I notify the system when a Manager (Approver) is on leave? Once the system knows a Manager is on leave, how can Approval requests sent to that Manager be routed to ...
0
votes
3answers
26 views

Approval Process - Prevent submitter from approving

Is there any way we can prevent submitter of approval process from approving the record?
0
votes
0answers
6 views

Dynamic Approval routing to a list of Users

I'd like to know how to submit a record for approval to a list of Users in a particular Role. Since this is not doable in Standard Approval Process, I thought Dynamic Approval routing would help. But ...
3
votes
1answer
35 views

How can I determine if the current user in an Apex transaction can modify an Approval Process locked record?

I need a mechanism to detect if a record is currently locked by an approval process and it would block the user running the Apex code from modifying the record. First, some context for where this is ...
0
votes
1answer
21 views

No applicable approval process found - Process builder

I have a process built in process builder that will submit a record through an approval process once certain criteria is met. The purpose of the approval process is to lock the record so changes can'...
0
votes
1answer
34 views

Field update after approval process

I am having an existing process where a trigger triggers a approval process. After the approver clicks for approve a field called Approval_Status__c should be checked. I wrote a workflow but seems ...
0
votes
2answers
27 views

When an approver is dynamically chosen on the base of a related field is possible to reassign the approval step through apex?

Suppose to have an approval process where the approver of a step is a related user designated through a custom field. If the value of the custom field is changed, all the records in this approval step ...
0
votes
1answer
9 views

approval process action 1

If we create a customer name and checkbox true then it must assign to two users to get approval ( any two user) but after first user approved then it automatically send to second user for approval how ...
1
vote
1answer
48 views

how do i create a approval process on Quote Line Item

I Need a small Help, MY requirement is to create a approval process on Quote Line Items, (Whenever the discount is more than 10%) it should be automatically assigned to the Approver I have designed a ...
2
votes
0answers
17 views

How do I show a custom error message instead of 'No applicable approval process was found'? Salesforce [duplicate]

I would like to show a custom error message to override the standard Salesforce message of 'No applicable approval process was found.' The error message is due to the user not checking a box, which ...
1
vote
0answers
62 views

Add ProcessInstanceWorkitem tab [closed]

By clicking on Step 1 link in Approval History related list, you can access ProcessInstanceWorkitem item which show all user's pending request by modifying the URL. Is there a way to add a tab instead ...
0
votes
0answers
32 views

Reassigning Pending Approval Request thru APEX (as non-admin user)

Is there any way to re-assign a pending approval request thru apex code (for non-admin users)? I have an opportunity related approval process kicked off that created the approval requests (currently ...
0
votes
1answer
34 views

Locked record editable by any user on VF page during approval process

I have a multi-level approval process which locks the record from editing when it is initially submitted and locks the record as a final approval action (except for current approver and sys admin). We ...
0
votes
0answers
291 views

NO_APPLICABLE_PROCESS, No applicable approval process was found, yet the criteria is met, no code change in years

Having an odd issue in our prod org recently. Code and approval items haven't changed, yet for some reason after our last monthly release we've been getting the no_applicable_process error here. The ...
0
votes
0answers
18 views

When approver rejected the approval process, it should go to the final rejection and unlock the record but this is not happening

When approver rejected the approval process, it should go to the final rejection and unlock the record but this is not happening.
0
votes
1answer
17 views

Visualforce Controller to Enter Approval Process

I have a Visualforce page that is designed to allow an approver to either approve/reject an Opportunity as a Final decision, or approve the Opportunity and then send it on for another approval. The ...
0
votes
0answers
28 views

Auto approve record after it were submitted for approval

I try to approve record automatically after it was send for approval by standard functionality. How can it be done through apex? Here is my code: trigger ITAssetTrigger on IT_Asset__c (after update) {...
0
votes
0answers
15 views

Approval Process email actions work in classic but not Lightning

Created an approval process in classic that works as expected sending email to my gmail account. When I upgraded the app to Lightning the approval email alert does not send email. I looked at various ...
0
votes
0answers
21 views

Get Approver Ids or Names in approval process [duplicate]

Is there any way to get the list of all approvers across all steps configured in the approval process? I looked the ProcessDefinition and ProcessNode but they don't have the approver information.
0
votes
0answers
23 views

Move approval history to another record

We currently have an object that for many different reasons will be deprecated. We want to move the records to a new object, but also want to retain the approval history. Has anyone done this before? ...
0
votes
0answers
17 views

REST call for ApprovaProcess and ApprovalEntryCriteria not working

I posted a question about this some days ago. I'm trying to retrieve ApprovalEntryCriteria for an specific ApprovalProcess via metadata REST call: /services/data/v44.0/metadata/salesforce/types/...
0
votes
0answers
17 views

Retrieve approval process entry criteria via REST Api

I'm trying to retrieve an Approval Process entry criteria by its API Name. I know you can get the Id querying ProcessDefinition but I need to retrieve entry criteria via REST. I've seen that ...
1
vote
2answers
87 views

Assign record approval person based on value on a field

Is there a way to assign the approval for a record based on value of another field? Basically, I was trying to assign the approval based on the "area" field assigned to that record. Based on the area ...
0
votes
1answer
20 views

How to block user from use the “Submit for Approval” button if some fields are blank?

I have different approval processes on the same object and of course they require a different combination of entry criteria. However, all of them share the fact that some fields are mandatory for ...
0
votes
0answers
76 views

Auto approve record when it is submitted for approval

I try to approve next step of approval process automatically, when submit for approval button is pressed. So, when the button is pressed, it updates two fields on record and then trigger is run. I try ...
0
votes
0answers
24 views

ID of an approval request?

Is it possible to do something like: Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest(); req.setComments(quoteObj.Sales_Rep_Comments_for_Approval__c); req.setObjectId(quoteObj.id)...
0
votes
0answers
17 views

How to find and remove data record associated with an inactive approval process?

This is a duplicated of this and this questions. I decided to create a new one because the accepted answers don't explain how to find associated records but only that one should remove them before ...
0
votes
1answer
104 views

Approvals - Let the submitter choose the approver manually

Does anyone know if there is a way of restricting which users show in the drop down list if you select this option? We have a client who has 70 users, but only 12 of those are approvers. I would ...
1
vote
2answers
31 views

User hits record lock error despite class without sharing

My users keep hitting a record lock error despite the class being defined as without sharing. My understanding is that without sharing allows locked records to be edited by any user. This class is the ...
0
votes
1answer
18 views

Multi-level approvals

I am trying to create multi-level approvals and having trouble getting 2nd and 3rd approval (not sure if this is possible or not?) Scenario: I need 3 levels of approval for orders. Anything under £...
0
votes
0answers
19 views

Approval process- Configuring approvers

I have a opportunity which has lookup to account. In opportunity approval process- approval step- i need to have a approver as Account's manager--> Manager. In another step, Approver as Account's ...
0
votes
1answer
77 views

unlock record submitted for Approval

When a record is submitted for approval, it is locked by default. But as per the recent change by Salesforce, it can be unlocked using Apex class. I have this below Apex class which unlocks the ...
1
vote
0answers
17 views

is there a way to check if there is an approval process to aply to a record from a visual flow?

I'm doing a visual flow to validate some information before calling an approval process, in some cases the record does not apply to any approval process and I get an error. Is there a way to know if ...
0
votes
2answers
79 views

Process Instance object test coverage

Hi I have a batch that works on process instance object, i am struck how to achieve test class coverage for this as ElapsedTimeInHours is a system field and when i am creating approval instance and ...
1
vote
1answer
20 views

How do you use an automated approver AND a specific user approver?

Let's assume that Tom has to approve all quotes with a discount over 25%, but all managers below Tom also have to approve the quote before Tom does. That is not a problem, unless Tom has different ...
0
votes
0answers
71 views

{!ApprovalRequest.Internal_URL} in a Visualforce Email that is using a different related to object?

I'm creating an email template for an approval request and it is related to our quote object. When I try to use {!ApprovalRequest.Internal_URL} to get the URL to link out to the quote, it doesn't ...
0
votes
0answers
21 views

How to avoid locking a record when the approval process is pending?

I need to have records of a given objects unlocked during the pending phase of the approval process. I tried to use a trigger on the object under the after update condition and check the status of ...
0
votes
0answers
21 views

Add error displays message as well as updates record in Salesforce lightning

I have the following piece of code in my case before trigger. approvalStatements.get(pi.TargetObjectId).addError( 'Operation Cancelled: Please provide a reason ' + ...
0
votes
0answers
6 views

Performing an action when user reassigns an approval step

In the approval process a user can reassign the step to someone else. I need to build a business logic around this reassignment but I cannot find where in Salesforce its happening. I tried workflows ...
1
vote
0answers
206 views

Making approval comments mandatory - different behavior Classic vs Lightning

I am trying to make Approval Comments mandatory for the Approver while Approving. I was using the following apex trigger, approval process steps and workflow field update as per the following blog ...
0
votes
0answers
15 views

Unlock a record when a reference is made during approval process

We have a multi level approval process involving different users for our service cases. The record would be locked from editing for all the users except the current approver and the admin of course. ...
6
votes
1answer
51 views

Apex Approval.lock, programmatic locking and record editability

Background: In Winter '16, Salesforce introduced the Approval class for setting approval locks and unlocks through Apex (release notes). Since then, my company has been leveraging this functionality ...
0
votes
0answers
23 views

Stop or Restrict Trigger to auto submit Approval Process

There is an existing Trigger which submits any record created/updated to approval process. But a recent new approval process created should not be auto submitted. Is there any workaround to restrict a ...
0
votes
0answers
38 views

Is there any way to provide a custom button to approval process accept/reject page

I want to understand if there is any way I can put a button which will perform a custom logic in the approval - accept/reject page. i.e. in the following page Or I have to create a visual page/ ...
0
votes
1answer
76 views

Account Name is not visible in the Approval Process record?

Account Name is not visible the Approval Process record. Can you tell why this maybe happening? 1. In 1st image, Account Name is visible in List View. 2. But when I open specific record, account ...
2
votes
1answer
68 views

Bulkify Apex Approval.ProcessSubmitRequest

I have an apex class that submits opportunities for approval if they are over a certain threshold. This works great when processing small batches, but when trying to submit larger batches it fails ...
-2
votes
1answer
49 views

Not Unlocking the record after final rejection of approval process [closed]

When approver rejected the approval process, it should go to the final rejection and unlock the record but this is not happening. We have to do it by code ? or is there any other approach for this ?