You need to sign in to do that
Don't have an account?
Chirag Mehta
Method to update Opportunity to Next STAGE
Is there any method in Apex which allows to move a selected opportunity to next stage.
Something like
opportunity o = [Select Id from Opportunity where Id ='asdsdasd' limit 1]; o.StageName = o.nextStage(); update o;
Above code does help to retrieve the Stages, but how do i pass information of the BusinessProcess/RecordType for which i need the stages.
My requirement is to promote or demote an opportunity based on RecordType(Business Process) to which it belongs.
For eg., Suppose there are two opportunity record types (having diff stages) so when i click on promote, it should automatically determine the record type(business process) of opportunity and accordingly promote it to respective stage.
Did you ever have any success with this? I have been unable to find the link between business processes and stages. I don't know if it is exposed to the API or not.
no luck yet! After that I moved to different project, so didn't dwelled in later.