Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8999369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:10:17+00:00 2026-06-16T00:10:17+00:00

I am trying to catch the FinishActivity in the UI/UX when a user selects

  • 0

I am trying to catch the FinishActivity in the UI/UX when a user selects the option from a Page or Component.

Using the standard method of adding the extended command in the relevant config file I am able to add the interface and catch the isAvailable method using the scripts shown below.

Tridion.Extensions.CheckTitleOnFinishActivitySE = function Commands$CheckTitleOnFinishActivitySE() {
    Tridion.OO.enableInterface(this, "Tridion.Cme.Commands.CheckTitleOnFinishActivitySE");
    this.addInterface("Tridion.Web.UI.Editors.SiteEdit.Commands.FACommand", ["CheckTitleOnFinishActivitySE", $const.AllowedActions.FinishActivity]);
};
Tridion.Extensions.CheckTitleOnFinishActivitySE.prototype._isAvailable = function (selection) {
    var response = Tridion.Web.UI.Editors.SiteEdit.Commands.FinishActivity.prototype._isAvailable(selection);
};

However, when I attempt to reuse the exisitng isEnabled function:

Tridion.Extensions.CheckTitleOnFinishActivitySE.prototype.isEnabled = function (selection) {
    var response = Tridion.Web.UI.Editors.SiteEdit.Commands.FinishActivity.prototype._isEnabled(selection);
};

or even copying the existing code from the siteedit function itself (which I’d obviously rather not do)

Tridion.Extensions.CheckTitleOnFinishActivitySE.prototype.isEnabled = function (selection) {
    return (selection && selection.getProperty && selection.getProperty("isSEPage")) && 
        this.callBase("Tridion.Cme.Command", "_isEnabled", [selection]);
};

I receieve the following error:

Can’t execute the command “FinishActivity” on [tcm:8-349-131200].
Reason: not enabled.

I can force the state to enabled by using just return true from the isEnabled function but I’d rather inherit/reuse the existing check to cater for current and future scenarios…

I can confirm the _isAvailable is caught and returns true and that the required function to extend is isEnabled and not _isEnabled (adding the latter alone or in addition to isEnabled has no effect)

Any advice would be splendid!

Thanks in advance.

Update – debug addition

So, I added the following into my extended isEnabled to track the difference between the response on the selection object in my isEnabled ‘v’ the default isEnabled:

The ‘workflow.js’ shows the value if the isSEPage property as true – but when checked directly in my function it’s false. It reads consistent then that when called from my isEnabled into the original it then returns false also. I don’t understand what could happen to the selection or that I’d be dealing with a different selection object/context?

Updated extended isEnabled with debug scripts:

Tridion.Extensions.CheckTitleOnFinishActivitySE.prototype.isEnabled = function (selection) {

    $log.message('myfile.js::FinishActivity.prototype._isEnabled::selection.getProperty("isSEPage") = ' + selection.getProperty("isSEPage"));

    $log.message('myfile.js::FinishActivity.prototype.isEnabled ==> checking calling original...');
    var response = Tridion.Web.UI.Editors.SiteEdit.Commands.FinishActivity.prototype._isEnabled(selection);
    $log.message('myfile.js::FinishActivity.prototype.isEnabled ==> ' + response);


    $log.message('myfile.js::FinishActivity.prototype.isEnabled ==> checking using copied code from original...');
    return (selection && selection.getProperty && selection.getProperty("isSEPage")) &&
        this.callBase("Tridion.Cme.Command", "_isEnabled", [selection]);


};

Output (workflow.js represents the original workflow value for the same evaluation)

workflow.js:FinishActivity.prototype._isEnabled::selection.getProperty(“isSEPage”)
= true myfile.js::FinishActivity.prototype._isEnabled::selection.getProperty(“isSEPage”)
= undefined myfile.js::FinishActivity.prototype.isEnabled ==> checking calling original…
workflow.js:FinishActivity.prototype._isEnabled::selection.getProperty(“isSEPage”)
= undefined myfile.js::FinishActivity.prototype.isEnabled ==> undefined myfile.js::FinishActivity.prototype.isEnabled ==> checking
using copied code from original… Can’t execute the command
“CheckTitleOnFinishActivitySE” on [tcm:8-349-131200]. Reason: not
enabled.

More debug

I see that in the original CME workflow script there is no isEnabled function at all?

I added the following to the extended isEnabled scipt:

Tridion.Extensions.CheckTitleOnFinishActivitySE.prototype.isEnabled = function (selection) {

    $log.message('myfile.js::FinishActivity.prototype._isEnabled::selection.getProperty("isSEPage") = ' + selection.getProperty("isSEPage"));
    $log.message('Tridion.Web.UI.Editors.SiteEdit.Commands.FinishActivity.prototype._isEnabled(selection) = ' + Tridion.Web.UI.Editors.SiteEdit.Commands.FinishActivity.prototype._isEnabled(selection));

$log.message('this.callBase("Tridion.Cme.Command", "_isEnabled", [selection]) = ' + this.callBase("Tridion.Cme.Command", "_isEnabled", [selection]));

resulting in:

myfile.js::FinishActivity.prototype._isEnabled::selection.getProperty(“isSEPage”)
= undefined Editor_v6.1.0.55920.269_.aspx:7175 workflow.js:FinishActivity.prototype._isEnabled::selection.getProperty(“isSEPage”)
= undefined Editor_v6.1.0.55920.269_.aspx:7175 Tridion.Web.UI.Editors.SiteEdit.Commands.FinishActivity.prototype._isEnabled(selection)
= undefined Editor_v6.1.0.55920.269_.aspx:7175 this.callBase(“Tridion.Cme.Command”, “_isEnabled”, [selection]) =
false

Although the original (SiteEdit) is still being executed prior to my script and returns

workflow.js::FinishActivity.prototype._isEnabled::selection.getProperty(“isSEPage”)
= true

I’m wondering if the Tridion SiteEdit isEnabled is being checked on selection of the option to FinishActivity and my extension is being executed when the FinishActivity action itself is instantiated. I’m looking further but if anyone sees anything in the iterim that would be great!

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:10:17+00:00Added an answer on June 16, 2026 at 12:10 am

    OK! So the Tridion SiteEdit instance of isEnabled is executed when the user selects the icon to trigger the ShowActivityStartedPopup Command.

    My isEnabled is triggered when the FininshActivity option is selected by the user.

    Can anyone see a quicker way I could have gotten to this conclusion… or if this conclusion is not correct…

    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to catch some letters and special characters. I'm using this method:
I'm trying to catch an event when a user clicks a blank space on
I'm having problems with trying to catch an error. I'm using Pyramid/SQLAlchemy and made
I'm using Cognos and I'm trying to catch the enter key so that the
I am trying to catch an event in the VBSCRIPT of an html page
I am trying to catch the signal that indicates that the user has used
Hey all I'm using a MPMoviePlayerController and trying to catch my exception when there
I'm trying to catch debug information from VMware. This might be an easy task
I am trying to catch when the user has pressed the Home button. I
I am trying to catch some data from iostat output: # iostat -m avg-cpu:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.