function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Madhuri KulkarniMadhuri Kulkarni 

Opportunity field updates

Hi all,
I have a question, would be happy if you can give me some pointers.
I have third party operation which uploads some documents in dropbox and based on that opportunities are created manually, like 10-15 at a time, depending on how many documents are there. (I would like to automate this if possible)
The person who creates  these opportunities does not have have credentials to promote these opportunities from one stage to next stage, so he is dependent on admin/business analyst to do it. I want to make this automated. I thought of workflow rule based on a criteria on opportunity field Sales company(custom field). This field value is specific for these third party opportunities. So based on that field value edit when the value = "xyz" I can trigger the workflow rule. This seems like a very simplistic solution  Is there any better/professional way to do this? 
Peter FribergPeter Friberg
A workflow will execute in same user context so if user has not access to bump the stage, the workflow will fail as well.

A complex solution would be to create a trigger on opportunity of type before insert you could from that trigger call a class that uses "without sharing" which will make it possible to bump the stage. But beware this is not an ideal solution.

Couldn't you just add a permission set to the user giving that person access to the stage add a workflow. You could further create a validation rule that checks the value "xyz" on Sales company(custom field), the specific user (or profile preferably) and new stage to prevent the person (profile) form setting a stage other that what you need?
Madhuri KulkarniMadhuri Kulkarni
Thanks Peter for the reply Peter. I like the permission set based solution that you suggested.