1

I'm using publisher action on object with vf. In my vf im getting the following javascript error in the publisher.js file : uncaught #.

here is my code :

    <apex:page docType="html-5.0" sidebar="false" showheader="false" standardcontroller="LigneDeRapport__c" extensions="VFC32SignalerRejet">

     <apex:includeScript value="{!URLFOR($Resource.SF1,'Jquery/jquery-1.9.1.js')}"/>
 <apex:includeScript value="{!URLFOR($Resource.SF1,'Jquery/jquery-ui.js')}"/>
 <script type='text/javascript' src='/canvas/sdk/js/publisher.js'/>

<script>
    if(typeof jQuery != 'undefined'){
        $j =jQuery.noConflict();
    }

    function rejectLine(eId){
         $j("#msg-container").hide();       
         showLoading("loading");

         Visualforce.remoting.Manager.invokeAction(
            '{!$RemoteAction.VFC32SignalerRejet.rejectRecord}',
            eId,
            function(result, event){
                if (event.status)   {                     

                  Sfdc.canvas.publisher.publish({name : 'publisher.refresh', payload : {feed:true}}); 
                }                           
            },
            {escape: true}
        );  

    }
</script>

........

what i am trying to do is to redirect to the previous page when finish execution.

  • can you post the line of code which use the javascript function : rejectLine? – Ashwani Jun 13 '14 at 11:40
  • I got it to work. In fact the publisher.js show error only when run in the browser one/one.app, but when running on the mobile phone, there is no error, and redirection works fine. – vanessen Jun 13 '14 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.