• Megan Moody
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I'm working in a free trial instance of the Service Cloud Console. I have created only one object and a few VF pages with very, very minimal stuff in them. As I'm a newbie, I'm trying to upload a css file (with almost nothing in it to start, being guided by this post http://wiki.developerforce.com/page/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce) as a static resource. I did that and added the reference to the style sheet in my VF page. Now when I try to use the Developer Console I get a REQUEST_LIMIT_EXCEEDED error saying "Could not open workspace: TotalRequests Limit exceeded." I can't imagine how I could possibly exceeding anything. It's a virutally empty environment, data and code-wise. 

Anyone have any tips? I can edit the VF page and Apex classes from within the Setup, but I'd like to use the Developer Console for ease of use. 

Any help that can be provided is most appreciated. 
I am doing development in the Service Cloud Service Console. I discovered that our needed functionality isn't there in the service console configurability, so I moved on to creating my own custom console. I used the sample code from this post (http://wiki.developerforce.com/page/Custom_Interaction_Logs) on wiki.developerforce which I was pointed to via this blog post (http://blogs.salesforce.com/product/2012/02/custominteractionlog.html)in blogs.salesforce.com. That code uses the Task, Case, and Contact objects. Rather than Case, I need to use a custom object (Risk__c). 

And here I should note that I'm totally new to Visualforce and Apex coding, so please forgive any simple questions/confusions on my part. 

Problem:
The Save and Save New buttons on the log are not saving

 
Pertinent Information:
  • They should save the information in the Log screen to the Activity History of my custom object, Risk.
  • I am 99% sure that the code linking the Log to my Contact is working properly.
  • No errors are generated when I click either the Save or Save New buttons.
  • When I click Save, the only thing that happens is the "Last Save" date time shows at the bottom of the screen.
  • When I click Save New, any information I entered in the fields manually is cleared (presumably to allow me to enter a new record. Duh, I know). 

***************************** Visual Force Code - my edited version *****************************

<apex:page standardController="Risk__c" extensions="CustomInteractionLog" tabStyle="Task">
<apex:includeScript value="/support/console/24.0/integration.js"/>

<apex:form >
<apex:pageBlock title="Log A Call" id="thePageBlock" mode="edit">
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}" reRender="updateable, relatedList"/>
<apex:commandButton value="Save And New" action="{!saveAndNew}" reRender="updateable, relatedList"/>
</apex:pageBlockButtons>
<apex:actionFunction action="{!updateWhoWhatId}" name="updateWhoWhatIdJS" reRender="updateable">
<apex:param name="newRiskID" assignTo="{!riskID}" value=""/>
</apex:actionFunction>
<apex:outputPanel id="updateable">
<apex:pageBlockSection columns="1">
<apex:inputField value="{!task.whoId}"/>
<apex:inputField style="width:230px;" value="{!task.subject}"/>
<apex:inputField style="width:230px;" value="{!task.Category__c}"/>
<!-- <apex:inputField value="{!task.ANI__c}"/> -->
</apex:pageBlockSection>
<apex:pageBlockSection columns="1">
<apex:inputField style="height:100px;width:350px;" value="{!task.description}"/>
<br/><apex:outputText value="{!statusMessage}" />
</apex:pageBlockSection>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
<apex:outputPanel id="relatedList">
<apex:relatedList list="ActivityHistories"/>
</apex:outputPanel>
</apex:page>


***************************** Visual Force Code - the version I copied from wiki.developer (http://wiki.developerforce.com/page/Custom_Interaction_Logs) *****************************

<apex:page standardController="Case" extensions="CustomInteractionLog" tabStyle="Task">   
    <apex:includeScript value="/support/console/24.0/integration.js"/>
    <script type="text/javascript">
         
        var callObjectId = null;
         
        var onFocusedSubtabCallback = function (result) {
            var entityId = result.objectId;
            if (entityId.substr(0,3) === '500') {
                updateWhoWhatIdJS(result.objectId);
            }
        }; 
        sforce.console.onFocusedSubtab(onFocusedSubtabCallback);

        var getCallAttachedDataCallback = function (result) {           
            setCallAttachedDataJS(callObjectId, JSON.parse(result.data).ANI);
        };
     
        /* Retrieving call id of first call that came in and
        * calling getCallAttachedData() to retrieve call data.
        * Note that we are using the cti submodule here
        */                 
        var getCallObjectIdsCallback = function (result) {       
            if (result.ids !== 'null') {      
                var ids = result.ids.split(',');       
                if (ids.length > 0) {  
                    callObjectId = ids[0];    
                    sforce.console.cti.getCallAttachedData(callObjectId, getCallAttachedDataCallback);       
                }       
            }       
        };
        sforce.console.cti.getCallObjectIds(getCallObjectIdsCallback);
                        
        var onCallBeginCallback = function (result) {
            callObjectId = result.id;
            sforce.console.cti.getCallAttachedData(result.id, getCallAttachedDataCallback);
        };
        sforce.console.cti.onCallBegin(onCallBeginCallback);

        var onCallEndCallback = function (result) {
            setCallEndDataJS(result.duration, result.disposition);
        };
        sforce.console.cti.onCallEnd(onCallEndCallback);
         
    </script>
    <apex:form >
        <apex:pageBlock title="Log A Call" id="thePageBlock" mode="edit">
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}" reRender="updateable, relatedList"/>
                <apex:commandButton value="Save And New" action="{!saveAndNew}"reRender="updateable, relatedList"/>
            </apex:pageBlockButtons>
            <apex:actionFunction action="{!updateWhoWhatId}" name="updateWhoWhatIdJS"reRender="updateable">
                <apex:param name="newCaseId" assignTo="{!caseId}" value=""/>
            </apex:actionFunction>              
            <apex:actionFunction action="{!setCallAttachedData}" name="setCallAttachedDataJS"reRender="updateable">
                <apex:param name="CallObject" assignTo="{!CallObject}" value=""/>
                <apex:param name="ANI" assignTo="{!ANI}" value=""/>
            </apex:actionFunction>
            <apex:actionFunction action="{!setCallEndData}" name="setCallEndDataJS"reRender="updateable, relatedList">
                <apex:param name="CallDuration" assignTo="{!CallDurationInSeconds}" value=""/>
                <apex:param name="CallDisposition" assignTo="{!CallDisposition}" value=""/>
            </apex:actionFunction>           
            <apex:outputPanel id="updateable">
                 <apex:pageBlockSection columns="1">
                    <apex:inputField value="{!task.whoId}"/>                       
                    <apex:inputField value="{!task.whatId}"/>
                    <apex:inputField style="width:230px;" value="{!task.subject}"/>                   
                    <!-- <apex:inputField value="{!task.ANI__c}"/> -->                   
                </apex:pageBlockSection>
                <apex:pageBlockSection columns="1">
                    <apex:inputField style="height:100px;width:350px;" value="{!task.description}"/>                                       
                    <br/><apex:outputText value="{!statusMessage}"/>                                      
                </apex:pageBlockSection>
            </apex:outputPanel>           
        </apex:pageBlock>
    </apex:form>
    <apex:outputPanel id="relatedList">
        <apex:relatedList list="OpenActivities"/>
    </apex:outputPanel>
</apex:page>   


***************************** Screen shot of my in-development custom interaction log. 
 User-added image
I'm working in a free trial instance of the Service Cloud Console. I have created only one object and a few VF pages with very, very minimal stuff in them. As I'm a newbie, I'm trying to upload a css file (with almost nothing in it to start, being guided by this post http://wiki.developerforce.com/page/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce) as a static resource. I did that and added the reference to the style sheet in my VF page. Now when I try to use the Developer Console I get a REQUEST_LIMIT_EXCEEDED error saying "Could not open workspace: TotalRequests Limit exceeded." I can't imagine how I could possibly exceeding anything. It's a virutally empty environment, data and code-wise. 

Anyone have any tips? I can edit the VF page and Apex classes from within the Setup, but I'd like to use the Developer Console for ease of use. 

Any help that can be provided is most appreciated. 
I am doing development in the Service Cloud Service Console. I discovered that our needed functionality isn't there in the service console configurability, so I moved on to creating my own custom console. I used the sample code from this post (http://wiki.developerforce.com/page/Custom_Interaction_Logs) on wiki.developerforce which I was pointed to via this blog post (http://blogs.salesforce.com/product/2012/02/custominteractionlog.html)in blogs.salesforce.com. That code uses the Task, Case, and Contact objects. Rather than Case, I need to use a custom object (Risk__c). 

And here I should note that I'm totally new to Visualforce and Apex coding, so please forgive any simple questions/confusions on my part. 

Problem:
The Save and Save New buttons on the log are not saving

 
Pertinent Information:
  • They should save the information in the Log screen to the Activity History of my custom object, Risk.
  • I am 99% sure that the code linking the Log to my Contact is working properly.
  • No errors are generated when I click either the Save or Save New buttons.
  • When I click Save, the only thing that happens is the "Last Save" date time shows at the bottom of the screen.
  • When I click Save New, any information I entered in the fields manually is cleared (presumably to allow me to enter a new record. Duh, I know). 

***************************** Visual Force Code - my edited version *****************************

<apex:page standardController="Risk__c" extensions="CustomInteractionLog" tabStyle="Task">
<apex:includeScript value="/support/console/24.0/integration.js"/>

<apex:form >
<apex:pageBlock title="Log A Call" id="thePageBlock" mode="edit">
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}" reRender="updateable, relatedList"/>
<apex:commandButton value="Save And New" action="{!saveAndNew}" reRender="updateable, relatedList"/>
</apex:pageBlockButtons>
<apex:actionFunction action="{!updateWhoWhatId}" name="updateWhoWhatIdJS" reRender="updateable">
<apex:param name="newRiskID" assignTo="{!riskID}" value=""/>
</apex:actionFunction>
<apex:outputPanel id="updateable">
<apex:pageBlockSection columns="1">
<apex:inputField value="{!task.whoId}"/>
<apex:inputField style="width:230px;" value="{!task.subject}"/>
<apex:inputField style="width:230px;" value="{!task.Category__c}"/>
<!-- <apex:inputField value="{!task.ANI__c}"/> -->
</apex:pageBlockSection>
<apex:pageBlockSection columns="1">
<apex:inputField style="height:100px;width:350px;" value="{!task.description}"/>
<br/><apex:outputText value="{!statusMessage}" />
</apex:pageBlockSection>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
<apex:outputPanel id="relatedList">
<apex:relatedList list="ActivityHistories"/>
</apex:outputPanel>
</apex:page>


***************************** Visual Force Code - the version I copied from wiki.developer (http://wiki.developerforce.com/page/Custom_Interaction_Logs) *****************************

<apex:page standardController="Case" extensions="CustomInteractionLog" tabStyle="Task">   
    <apex:includeScript value="/support/console/24.0/integration.js"/>
    <script type="text/javascript">
         
        var callObjectId = null;
         
        var onFocusedSubtabCallback = function (result) {
            var entityId = result.objectId;
            if (entityId.substr(0,3) === '500') {
                updateWhoWhatIdJS(result.objectId);
            }
        }; 
        sforce.console.onFocusedSubtab(onFocusedSubtabCallback);

        var getCallAttachedDataCallback = function (result) {           
            setCallAttachedDataJS(callObjectId, JSON.parse(result.data).ANI);
        };
     
        /* Retrieving call id of first call that came in and
        * calling getCallAttachedData() to retrieve call data.
        * Note that we are using the cti submodule here
        */                 
        var getCallObjectIdsCallback = function (result) {       
            if (result.ids !== 'null') {      
                var ids = result.ids.split(',');       
                if (ids.length > 0) {  
                    callObjectId = ids[0];    
                    sforce.console.cti.getCallAttachedData(callObjectId, getCallAttachedDataCallback);       
                }       
            }       
        };
        sforce.console.cti.getCallObjectIds(getCallObjectIdsCallback);
                        
        var onCallBeginCallback = function (result) {
            callObjectId = result.id;
            sforce.console.cti.getCallAttachedData(result.id, getCallAttachedDataCallback);
        };
        sforce.console.cti.onCallBegin(onCallBeginCallback);

        var onCallEndCallback = function (result) {
            setCallEndDataJS(result.duration, result.disposition);
        };
        sforce.console.cti.onCallEnd(onCallEndCallback);
         
    </script>
    <apex:form >
        <apex:pageBlock title="Log A Call" id="thePageBlock" mode="edit">
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}" reRender="updateable, relatedList"/>
                <apex:commandButton value="Save And New" action="{!saveAndNew}"reRender="updateable, relatedList"/>
            </apex:pageBlockButtons>
            <apex:actionFunction action="{!updateWhoWhatId}" name="updateWhoWhatIdJS"reRender="updateable">
                <apex:param name="newCaseId" assignTo="{!caseId}" value=""/>
            </apex:actionFunction>              
            <apex:actionFunction action="{!setCallAttachedData}" name="setCallAttachedDataJS"reRender="updateable">
                <apex:param name="CallObject" assignTo="{!CallObject}" value=""/>
                <apex:param name="ANI" assignTo="{!ANI}" value=""/>
            </apex:actionFunction>
            <apex:actionFunction action="{!setCallEndData}" name="setCallEndDataJS"reRender="updateable, relatedList">
                <apex:param name="CallDuration" assignTo="{!CallDurationInSeconds}" value=""/>
                <apex:param name="CallDisposition" assignTo="{!CallDisposition}" value=""/>
            </apex:actionFunction>           
            <apex:outputPanel id="updateable">
                 <apex:pageBlockSection columns="1">
                    <apex:inputField value="{!task.whoId}"/>                       
                    <apex:inputField value="{!task.whatId}"/>
                    <apex:inputField style="width:230px;" value="{!task.subject}"/>                   
                    <!-- <apex:inputField value="{!task.ANI__c}"/> -->                   
                </apex:pageBlockSection>
                <apex:pageBlockSection columns="1">
                    <apex:inputField style="height:100px;width:350px;" value="{!task.description}"/>                                       
                    <br/><apex:outputText value="{!statusMessage}"/>                                      
                </apex:pageBlockSection>
            </apex:outputPanel>           
        </apex:pageBlock>
    </apex:form>
    <apex:outputPanel id="relatedList">
        <apex:relatedList list="OpenActivities"/>
    </apex:outputPanel>
</apex:page>   


***************************** Screen shot of my in-development custom interaction log. 
 User-added image
I'm working in a free trial instance of the Service Cloud Console. I have created only one object and a few VF pages with very, very minimal stuff in them. As I'm a newbie, I'm trying to upload a css file (with almost nothing in it to start, being guided by this post http://wiki.developerforce.com/page/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce) as a static resource. I did that and added the reference to the style sheet in my VF page. Now when I try to use the Developer Console I get a REQUEST_LIMIT_EXCEEDED error saying "Could not open workspace: TotalRequests Limit exceeded." I can't imagine how I could possibly exceeding anything. It's a virutally empty environment, data and code-wise. 

Anyone have any tips? I can edit the VF page and Apex classes from within the Setup, but I'd like to use the Developer Console for ease of use. 

Any help that can be provided is most appreciated.