Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Can't use setActiveStage js-function

Posted on by

Hi!

I have created simple example (set this function onLoad form):

function test() {

var procid=Xrm.Page.getAttribute("processid").getValue();
if (procid=="9f032107-53b0-490b-b178-43ca28e42ec4")
{
  var stcopy = Xrm.Page.data.entity.attributes.get("elko_stageid").getValue();
  var GUID = "";
  if (stcopy="5705561b-ded6-47b9-a273-25932a264f1d")
  {
   GUID="fbef4b74-ec42-4a27-92a6-d683ca2a31d5";
   Xrm.Page.data.process.setActiveStage(GUID,
                                    function () {
                                        //no event
                                    });
  }

}

}

But I always getting an error - "Invalid".

There are three reasons why this value may be returned:

  • The stageId parameter is a non-existent stage ID value.

  • The active stage isn’t the selected stage

  • The record hasn’t been saved yet.

Have anybody some ideas to solve it? 

Thanks!

*This post is locked for comments

  • CrmMouss Profile Picture
    CrmMouss 175 on at
    RE: Can't use setActiveStage js-function

    hi Anatoly i have the same problem with js

    what can i do with customization ?

  • Verified answer
    RE: Can't use setActiveStage js-function

    I have solved it. I used only customization (via BPF).

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans