Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

setActiveStage() Problem

(0) ShareShare
ReportReport
Posted on by

Hello There!

I've this problem to set stages.

We have 2 way to get in "Opportunity Entity".

1) Enter by Lead-Opportunity (When we have a new client and must qualify)

2) Enter by Opportunity (When we have a old client)

In both I made the same "Selling Process" (sames variables, names, etc). Of course, I've add the stage of qualify in Leads. So we have:

1) Stage(Lead)+Stages(Opportunity) = Process Lead-Opportunity

2) Stages(Opportunity) = Process Opportunity

First I've work with option (2) and made a Script that let me move between stages (Example: From Stage 4 to Stage 1, when we "re-active" the selling).

For this I've use : 

if(reabdos==850000000){Xrm.Page.data.process.setActiveStage
("8fe9029a-e925-4224-97eb-f6603847a95b",function (status){........ It's to long.

Where Stage1 Id (2) : "8fe90....." is the StageId1 of the first Stage in this process.

Now, When I've tried use this scrip in option (1)... I discovered:

*Stage1 Id (1) : 

"383c3598-56a7-1a70-27db-a8bda1a87c7e"

Where Stage1 will be the first in the "opportunity part" (For Lead part I named Stage0).

The point of it is:

1)Who can script that the setActiveStage move to Stage1 (1) or Stage1 (2) .... we can write "||" ?.

2)I've tried write only Stage1 Id (1), but the callbackFunction give me "Invalid", but I don't know why it's invalid if it's the id gave by console.log(). We have a special method for that? 

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans