• Jatin Jain 11
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
In a nutshell the issue is, We've implemented custom email publisher action where we are using publisher js. We are populating email body with the response received with publisher js but its not getting updated. It was working fine till API version 32 but since version 33 its breaking.

Some more pointers on the events which we see while calling this functionality. It looks specific to Custom Publisher action called Send_Email on Case object which contains a visualforce page that has apex:emailPublisher tags.

Following are the javascript events that works on Winter 15 and doesnt work on Spring 15

Winter 15 :CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<1> Chatter.js:257 CEB EVENT! ns<action:Case.Email> en<onSetInputValues> pld<[object Object]> exec-time<1> Chatter.js:257 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<0> Chatter.js:257 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<0> Chatter.js:257 CEB EVENT! ns<action:Case.Email> en<onSetInputValues> pld<[object Object]> exec-time<9> Chatter.js:257 CEB EVENT! ns<action:Case.Email> en<onSetInputValues> pld<[object Object]> exec-time<0>Spring 15 :CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<4> Chatter.js:257 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<0> EntityFeedCore.js:17 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<1> Chatter.js:257 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-timeHas any one faced such issue or have any pointer on this? Has salesforce changed/introduced anything new around it?
In a nutshell the issue is, We've implemented custom email publisher action where we are using publisher js. We are populating email body with the response received with publisher js but its not getting updated. It was working fine till API version 32 but since version 33 its breaking.

Some more pointers on the events which we see while calling this functionality. It looks specific to Custom Publisher action called Send_Email on Case object which contains a visualforce page that has apex:emailPublisher tags.

Following are the javascript events that works on Winter 15 and doesnt work on Spring 15

Winter 15 :CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<1> Chatter.js:257 CEB EVENT! ns<action:Case.Email> en<onSetInputValues> pld<[object Object]> exec-time<1> Chatter.js:257 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<0> Chatter.js:257 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<0> Chatter.js:257 CEB EVENT! ns<action:Case.Email> en<onSetInputValues> pld<[object Object]> exec-time<9> Chatter.js:257 CEB EVENT! ns<action:Case.Email> en<onSetInputValues> pld<[object Object]> exec-time<0>Spring 15 :CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<4> Chatter.js:257 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<0> EntityFeedCore.js:17 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-time<1> Chatter.js:257 CEB EVENT! ns<entityFeed:publisher> en<onShow> pld<[object Object]> exec-timeHas any one faced such issue or have any pointer on this? Has salesforce changed/introduced anything new around it?
I have a custom Visualforce page as a Publisher Action that looks like this:
 
<apex:page controller="PageController" action="{!Init}" >

	<apex:includeScript value="/support/console/31.0/integration.js" /> 
	<apex:includeScript value="https://code.jquery.com/jquery-1.7.1.js" />
    
	<apex:form>
        
        <apex:actionFunction action="{!Init}" name="refresh" reRender="ContainerToBeRefreshed"/>
		
		<apex:outputPanel id="ContainerToBeRefreshed" layout="block">
			...
		</apex:outputPanel>
		
	</apex:form>
		
	<script type="text/javascript">
	$(function(){
		function eventHandler(msg){
			var focusedPrimaryTabId = msg.message;
			sforce.console.getEnclosingPrimaryTabId(function(result){
				var enclosingPrimaryTabId = result.id;                   
				if(focusedPrimaryTabId === enclosingPrimaryTabId){                       
					refresh();
				}
			});                
		};
		sforce.console.addEventListener('EventName', eventHandler);
		
		sforce.console.onFocusedSubtab( function ( result ) {        
			refresh();
		});
    });
	</script>
	
</apex:page>

Previously this enabled me to dynamically refresh the visualforce page when the user switched between (primary or sub) tabs in Service Console.

This no longer works. On loading the publisher action I see the following message written to the developer console from ServiceDesk.js.

addEventListener: Unsupported Operation: This API cannot be used on this component.

Is the API no longer available for use within a publisher action? Or is there an alternative way to do this?