• Chris Voge
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 15
    Replies
Hello,

I want to display a .TIF image retrieved from a REST web service. I do not want to have it downloaded.
The basic setup/flow is:
  • Call java service method that returns a .TIF image. Since I'm also updating the service, I'd like to know the ramifications between using @Produces({ "image/tif" }) and @Produces({ "application/octet-stream" }). I was also going to use 'Content-Disposition", "inline'
  • The above service would be called using an ActionFunction on the VF page and then the controller would call the service.
  • The result of the call would be a Blob object, which I would then convert to a Base64 encoded string to set on the controller.
  • The above ActionFunction would also have a rerender tag to rerender an image on the page with a data url and the Base64 string from the controller. 
      This is a little new to me, but does the above text sound like the correct direction to take ? Any guidance would be appreciated.

      Thanks, Chris
 
Hello,

We have a customer service application where customer reps start from
a customer search page and help customers with various needs. SOQL queries are
executed to retrieve the data during a search.

I was logged in as a rep doing a search and kept getting "No Results Found".
I had been logged in as other reps and performed the exact same search and
had gotten results from the search just fine.

Long story short. I noticed on the troubled user that they did not have a user
role defined. After setting the role, the search worked fine.

Can anyone tell me why a lack of a user role would affect the application
like this ? Let me know if need more specific information.

Thanks, Chris 
Hello,

Is there a way to force a timeout with JS Remoting ( besides, say, putting an endless loop
in your Apex code )  ? I set the timeout parm to 0000, but it still returns data. I'm making a  
REST WS call if that makes a difference.

I would have expected the 0000 millisecs would force the timeout.

Any feedback would be appreciated.

Thanks, Chris
I'm having trouble figuring out why the following code is not returning an Id so I can get to the point of refreshing my tab. I'm in debug mode and basically what I'm finding is that sforce.console.getEnclosingPrimaryTabId() is returning null. The event listener is firing correctly, so I know it's not an issue with that.

Does anyone see an obvious error that I don't or know of a bug that could be affecting this? Even if I rip the code straight out of Salesforce's documentation, I found that no results are returned.
<apex:page standardController="Account" extensions="FC_AccountExtension" title="{!account.Name}">
    <apex:detail relatedList="true"/>

    <apex:includeScript value="/support/console/31.0/integration.js"/>
    <script type='text/javascript'>
        //Set the title of the tab of the VF page to match the account
        sforce.console.setTabTitle('{!account.Name}');
        
        var listener = function (result) {
            alert('Message received from event: ' + result.message);
        };

        function refreshDetailListener() {
            console.log('refreshDetailListener fired!');

            var enclosingPrimaryTabId = sforce.console.getEnclosingPrimaryTabId();                
            console.log('enclosingPrimaryTabId: ' + enclosingPrimaryTabId );
            
            var enclosingTabId = sforce.console.getEnclosingTabId();    
            console.log('enclosingTabId: ' + enclosingTabId);
        }       
        
        //Add listeners
        sforce.console.addEventListener('SampleEvent', listener);
        sforce.console.addEventListener('refreshDetail', refreshDetailListener);
    </script>
</apex:page>


Here is the sample code from the getEnclosingPrimaryId function documentation:

<apex:page standardController="Case">
    <A HREF="#" onClick="testCloseTab();return false">
         Click here to close this primary tab</A>

    <apex:includeScript value="/support/console/20.0/integration.js"/>
    <script type="text/javascript">
        function testCloseTab() {
            //First find the ID of the current primary tab to close it
            sforce.console.getEnclosingPrimaryTabId(closeSubtab);
        }
       
        var closeSubtab = function closeSubtab(result) {
            //Now that we have the primary tab ID, we can close it
            var tabId = result.id;
            sforce.console.closeTab(tabId);
        };
    </script>
</apex:page>

Simple question: What does "return false" do ?

I've been working on an issue to open a subtab inside a primary tab by
clicking a apex commandButton. I have an onclick="openSubtabFunction()"  on
the button to trigger a function when clicked.

The issue was after the first click of the button, my subtab would not open.

Here is my action sequence:
- I click the commandbutton and the onclick function is triggered to open the subtab (tab opens fine)
- I close the subtab.
- I repeat step 1. Subtab doesn't open

All I did to fix the issue was change my onclick code to:

onclick="openSubtabFunction();return false"

And then, I can open the subtab repeatedly.

But, I just want to know what kind of difference "return false"
makes.

If anyone can explain, it would be appreciated very much.

Thanks, Chris

Hello

I just upgraded my Force.com IDE to version 31
for Eclipse.

After doing this, I started seeing compile errors in
my visualforce pages and I made no changes to the
code.

I reverted back to version 30 and they went away.

Can someone investigate ?

Thanks!!        
Chris
Is there a way to somehow disable or hide the "+" button for adding a new tab ?

Thanks, Chris
I created a couple of javascript functions for managing the number
of open tabs inside the service cloud console. I am using addEventListener
for the OPEN_TAB and CLOSE_TAB console events to trigger these functions.

I was also assuming clicking the "+" button for explicitly opening a new tab as well
as closing it would also trigger my functions. The function associated with the
OPEN_TAB was NOT triggered, but the function associated with the CLOSE_TAB
DID get triggered. Not sure why.

I am using the integration.js library, version 30. I tried 31, but it wasn't working
for some reason.

Any help would be appreciated. Thanks, Chris

I am working on building application on SFDC which will have http callouts to external REST API. 

 

https://help.salesforce.com/apex/HTViewHelpDoc?id=integrate_api_rate_limiting.htm&language=en According to this link, 

 

"Any action that sends a call to the API counts toward usage limits, except the following:

Outbound messages

Apex callouts"

 

My question is, do external HTTP callouts count towards this API limit? If not, is there a limit on number of external HTTP API calls I can make?

 

Apologies if this has been answered before. 

 

Thanks,

Swaroop