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 8082311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:03:16+00:00 2026-06-05T17:03:16+00:00

I have successfully created a feature in sharepoint that modifies the existing edit dialog

  • 0

I have successfully created a feature in sharepoint that modifies the existing edit dialog and adds a custom button to it like this.

Modified sharepoint dialog

and I am aware that I can pass back data when the user clicks the custom button like this.

<CommandUIHandlers>
    <CommandUIHandler Command="ActivateUser" CommandAction="/_layouts/MyFeature/MakeUserActive.aspx?ListID={ListId}&amp;ItemID={ItemId}&amp;ItemUrl={ItemUrl}&amp;ListUrlDir={ListUrlDir}" />
</CommandUIHandlers>

As detailed here

I can now handle the list item and perform my required actions on it BUT given that this button has been added in the modify context (IE: Inside the sharepoint edit item dialog) what if you want to save changes to the data itself?

To me it seems like using your custom button would always mean losing any changes the user has made to the data. Is there a way around this?

  • 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-05T17:03:17+00:00Added an answer on June 5, 2026 at 5:03 pm

    Good question!

    You actually already linked to the solution: Right now you are simply redirecting the user by using a URL as your CommandAction: CommandAction="/_layouts/MyFeature/MakeUserActive.aspx?ListID={ListId}&amp;ItemID={ItemId}&amp;ItemUrl={ItemUrl}&amp;ListUrlDir={ListUrlDir}"

    This if course redirects the user to another page without saving the current entry. What you want to do is use Javascript as linked in the MSDN article:

    CommandAction="javascript:alert('here be dragons');"
    

    You can either work the the SharePoint Javascript object model here and use something like SP.ListOperation.Selection.getSelectedItems(); or you could use complete custom code.
    From your aspx page name I can see you want to “make a use active” (btw: wouldn’t “ActivateUser.aspx” be nicer?). If this simply means setting a property in another list you could do that with the SharePoint OM, if it is some custom stuff you would need a webservice which you can call from JavaScript and “activate the user” like that. You can of course always access the current form and pass on the values the user entered. Or you could create a custom save button which does some stuff (activate user) before saving.

    Lastly: You can also have postbacks in your custom button where you could do anything you’d like.

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

Sidebar

Related Questions

I have successfully created a custom Facebook open graph action, and have been able
i have successfully created distribution profiles and installed on my xcode organiser, but this
I have successfully created an app that reads from a bundled .plist file and
This is what I have done so far: Created a class that has my
I have successfully created (and manually edited) an Item Template that will add a
I have successfully created a custom AccessDecisionVoter class and tied it into my web
I have successfully created a textbox that displays / collapses an error message depending
I have successfully created a Java class that provides database connectivity and returns a
I am working on an application that uses Swing. I have successfully created a
I have successfully created an application which is workable on the >3.0 devices. However,

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.