Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object for Save and Close button

RavitejaPaideti
Contributor III

Hi All,

 

I have implemented the below code to display a popup window while user hits save and close:

 

<script type="text/javascript">

 

    var messageBoxText = "Please Submit the form for Review. Ignore if submitted";
    var messageBoxTitle = 'Warning';
              Sys.Application.add_load(function() {
// Save/Apply Buttons
$('#master_SAVE_AND_CLOSE').attr('href',"#").removeAttr("onclick").unbind("click").click(function(){ MyFunction('save');return false;});
$('#master_SAVE_AND_CLOSE > div > div > img').removeAttr('onclick').unbind("click");

 

});

 

function MyFunction(type) {
window.alert(messageBoxText);

 

   SaveApply(type)
}

 

function SaveApply(type) {
if (type == 'save') {
javascript:__doPostBack('master$frame','SaveAndClose');
  }
}
</script>

 

 

The above worked while we were in 5.x. I need to use this again in 6.3 and I don't see the popup now. What changes do I need to apply?

 

Thanks!

13 REPLIES 13

Anonymous
Not applicable

Understood. A blocking pop-up to every user on every save seems like both overkill and a tremendous annoyance, but that's just me. If your business has asked for it and the users aren't livid, don't fix what isn't broken, I guess.

Hi Jason,

 

Yep, we have some other options like mentioned above which I kept in front of them. Users are asking " What if we can have a pop-up?!".

Agreed. It will be frustrating for users who are hitting save and close and see a popup every time. Custom objects might even break while installing packages against those applications.

I figured that would be the response, but I like to offer alternatives despite me being a huge geek that likes to build custom stuff.

 

Before you explore custom object... Do you have AWF, yet?

If not, I would recommend it.  I think this will give you a good option. 

 

Anyway, didn't look at all your code, but most likely it's using the old buttons.

Change it to master_btnSave instead of master_Save_and_Close.  

master_Save_and_Close doesn't exist now.