• Steve Blackwell
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Didn't have much luck in searching for this, so I figured I'd ask.

I have a spreadsheet I need to integrate to Salesforce for a client which is doing some propriatary calculations to output some leasing values for an opportunity. My initial plan was to simply recreate this logic in Salesforce and have the system auto calculate it and output it to a field on an opportunity, but the leasing company won't unlock the spreadsheet or allow anyone access to their calculations.

Is there any other way to pass values to and from a Spreadsheet? I wasn't finding any obvious answers or apps, which I think is usually because Salesforce aims to replace the spreadsheets. The client and I really want to get rid of the spreadsheet, but since we can't attain these propriatary calculations we're stuck with it for the time being and are trying to find a solution other than all the copy/pasting that otherwise needs to happen between Salesforce and Excel.
Working off of a tutorial I found in an older service cloud console cookbook, I've setup a scrolling marquee component at the bottom of our console. Not a coder by nature, I know my way around code well enough to troublehsoot and make basic modifications, but unfortunately the two changes I want to make to this code are a bit beyond me!

I'd like to:
  • Strip out HTML tags. It looks like the code does use .innerHTML to do this, but it doesn't work and posts in the Chatter group I'm pulling the text from are still showing <p> tags around my text in the marquee. I believe this cookbook was from pre-HTML posts in Chatter.
  • Set it to exclude posts with a certain #topic since the posts otherwise scroll forever, I want to be able to edit a Chatter post and add a #topic to it which will "shut it off" in the marquee.
Have spent quite a while on this and unfortunately I just haven't been able to figure it out with my novice level of coding!
 
<apex:page showHeader="false">

<meta http-equiv="refresh" content="60"/>

<style>
    body {
        padding: 10px;
        }
</style>

<!-- Start/Stop buttons - disabled for now
<div style="margin-left:auto; margin-right:auto;width:50%;">

    <apex:form>
        <apex:commandButton value="Start" id="startBtn" onclick="scrollButtonText();
        return false;" style="margin-left:10px"/>
        <apex:commandButton value="Stop" id="stopBtn" onclick="setButtonText();
        return false;" style="margin-left:10px"/>
    </apex:form>

</div>
-->

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

<!-- Here’s the unique ID of a Chatter feed from the feed’s URL. -->
<chatter:feed entityId="0F9c0000000A0Xs" rendered="true"/>

<script>
function srcUp(url) {
    sforce.console.openPrimaryTab(null, url, true);
    }

setInterval(function(){window.location.href = window.location.href;},60000);

function getFeedItemBody() {
    var feeds = [];
    var elements = document.getElementsByClassName('feeditemtext');
    for (var i=0; i<elements.length; i++) {
        if (elements[i].innerHTML) feeds.push(elements[i].innerHTML);
        }
    return feeds.join(" | ");
    }

var feedItems = getFeedItemBody();

scrollButtonText();

function scrollButtonText() {
    if (! feedItems)
    setButtonText();
    else {
    sforce.console.setCustomConsoleComponentButtonText(feedItems, function() {
        sforce.console.scrollCustomConsoleComponentButtonText(150, 5,
        true, function(result){});
        });
    }
}

function setButtonText() {
    sforce.console.setCustomConsoleComponentButtonText('Alerts');
    }
</script>

</apex:page>