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
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
41 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
86 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
613 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
46 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
347 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
248 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
71 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
203 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
127 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
235 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
445 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
276 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
592 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
465 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
123 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
302 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
202 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
455 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
56 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
314 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
237 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
321 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
231 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
273 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
30 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
258 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
142 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
632 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 ...
0
votes
1answer
479 views

How to get name of the approver in Email template

Hi friends i'm new to approval process. I stuck in a place where i need to send an email to the sales rep with either approved or rejected with whom approved or rejected. I had created a email ...
1
vote
1answer
617 views

Making Approval Comments Mandatory Without Code

I know that it possible to set the approval comments mandatory using an apex code. I will be glad to know if there is a solution to make approval comments mandatory without using a code?
2
votes
3answers
3k views

'Unlock' button in Salesforce Approval process?

Can someone please tell me the significance of 'Lock/Unlock' button in Approval process. I was just trying to create an Approval process on a Custom object as part of testing and did a very basic ...
0
votes
1answer
1k views

approval process assign to user queue

I am creating an approval process(standard setup wizard). The issue is in the step 3 of, "Specify Approver Field and Record Editability Properties".I want to assign the process to a user queue but I ...
0
votes
1answer
382 views

How to update approver comments in opportunity object

My requirement is to copy the approver comments in the Opportunity Level Field When the approver approves the record with comments.I have to update in opportunity level. Is there a way to achieve ...
1
vote
1answer
367 views

Process builder is not firing based on approval process field update

I stuck in a place where in approval process i have a field update. So based on this field value i run a process builder.But approval process is working fine.But the process builder is not working.If ...
0
votes
1answer
1k views

System.DmlException: Process failed. First exception on row 0; first error: MANAGER_NOT_DEFINED, Manager undefined.: []

Opportunity opp = new Opportunity(); opp.Account = acc; opp.OPP_closing_note__c = 'test'; opp.Unit_Price__c = 10; opp.Type = 'Project'; insert opp; ...
1
vote
1answer
346 views

How to approve a record with in a email itself

Hi friends i'm new to development.I got a requirement to approve a record on a certain basis.So, we create an approval process for that. But now i got a requirement like the record needs to be ...
1
vote
1answer
4k views

how to create the object processInstance in test class

how to create the object processInstance in test class? System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [...
8
votes
2answers
1k views

Query Current Step Number for Approval process

Is it possible to retrieve the current Step Number for an approval process via a query? If so how? I don't see this as available field in the ProcessInstanceNode object. Thanks!! Looking for Step ...