", "answerCount": 1, "upvoteCount": 0, "datePublished": "2015-02-04T03:58:27.000Z", "author": { "@type": "Person", "name": "Vicky M", "url": "https://trailblazers.salesforce.com/profileView?u=0053000000AlpSOAAZ", "affiliation": { "@type": "Organization", "name": "--" } }, "suggestedAnswer": [ { "@type": "Answer", "text": "This Answers Community is focused on configuration and design questions. Programmatic questions are best submitted to the developer forums at https://developer.salesforce.com where the forums and participants are geared toward programming troubleshooting and support. ", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8iIhSAJ", "datePublished": "2015-02-04T11:36:48.000Z", "author": { "@type": "Person", "name": "Jeff May", "url": "https://trailblazers.salesforce.com/profileView?u=00530000008BuwOAAS", "affiliation": { "@type": "Organization", "name": "--" } } } ] } }
Skip to main content
Vicky M 님이 #Data Management에 질문했습니다
I will display my visual force page in console app(in a tab).

 

If user clicks on cross icon on tab to close the tab with out saving data then i need to display unsaved changes dialog box.

 

I am able to show that dialog box but when user selects save on dialog box, need to execute my controller method which is not working. below is my page code. Can anyone help me on this.

 

<apex:page standardController="Case" extensions="CloseTabValidationSampleController">

 

    <apex:includeScript value="/support/console/28.0/integration.js"/>

 

    <script type="text/javascript">

 

    window.onload=testSetTabUnsavedChanges;

 

    

 

        function testOnTabSave() {

 

            sforce.console.onTabSave(handleSave);

 

        }

 

        var handleSave = function handleSave(result) {

 

        

 

        //Perform save logic here

 

        exeSave();

 

        sforce.console.setTabUnsavedChanges(false, undefined, result.id);      

 

    };

 

    

 

    function testSetTabUnsavedChanges() {

 

            sforce.console.getFocusedSubtabId(setTabDirty);

 

        };

 

         function setTabDirty(result) {

 

            sforce.console.setTabUnsavedChanges(true, displayResult, result.id);

 

        };

 

         function displayResult(result) 

 

         {

 

             testOnTabSave();

 

        };

 

        

 

         

 

  </script>

 

  <apex:form >

 

  <apex:pageBlock >

 

  <apex:pageBlockSection >

 

  <apex:inputText value="{!Caseob}"/>

 

  <apex:actionFunction name="exeSave" action="{!exeMethod}"/>

 

  </apex:pageBlockSection>

 

  </apex:pageBlock>

 

 </apex:form>

 

</apex:page>
답변 1개
  1. 2015년 2월 4일 오전 11:36
    This Answers Community is focused on configuration and design questions. Programmatic questions are best submitted to the developer forums at https://developer.salesforce.com where the forums and participants are geared toward programming troubleshooting and support. 
0/9000