• earlbarby
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 11
    Replies

Hi,

We're attempting to make a custom email publisher for Case Feed to completely replace the standard Answer Customer publisher and we're running into severe obstacles. We must be missing something with at least some of the below issues because this is seeming very developer unfriendly. Any help is greatly appreciated.

1) The VF page added to the Feed must have a static height and apex:emailPublisher widget has elements that dynamically expand/shrink on clicks. This creates whitespace under the publisher inside the page's iframe and creates an obvious gap above the actual feed. That is, unless we use javascript to automatically control or lock element sizing. Scrollbars inside of the iframe are worse. Are there any other options here?

2) In Summer 13, if you remove the standard Answer Customer publisher from the Feed then the Reply and Reply All buttons on email feed items simply don't work. In Winter 14 under the same setup, those buttons now pull the user out of the feed and send them to the native Send Email page. Ideally, since we're trying to replace the standard publisher, we'd like those buttons to take users to our custom publisher within the feed. Another acceptable option would be for the buttons to simply be removed from the email feed items when the standard publisher isn't on the feed layout. Given this behavior with the Reply buttons, how can we possibly make it so users will default to our publisher? They'd have to consistently remember to ignore the easily accessible buttons on the emails themselves and instead always choose the proper action from the left bar.

3) If we select a custom button from the "Replace Send Email Button with" menu and use the standard Answer Publisher action then we are presented with a stripped down email publisher, which sends an email, and then redirects per the button. What is the purpose of this if the email is always sent through the standard publisher anyway regardless of the override?

Thanks.

We have an Email Service running with an Apex class. This service has two email addresses under it. Suppose an email is BCC'ed to one of the address. From within the email handler class, how can we determine which address the message was sent to? BCC is not available on the inbound email object nor is it reliably in the headers.

Thanks,
Earl

Hi,

We have a package that needs to query numerous contacts by email address. It could be as many as 50 email addresses. Typically, we use a bulk query like:

 

Set<String> EmailSet = new Set<String>();
//EmailSet is populated
[Select Id From Contact Where Email in :EmailSet];

 This works fine in orgs with fewer than 100k contacts, but we get non-selective query errors when there are more than 100k contacts. According to Salesforce, Contact Email is indexed, so the error is likely due to the IN operator. A (poor) alternative is to query a single email address at a time, which does successfully avoid the non-selective error, but then we quickly exhaust the 100 SOQL query governor limit since there is a lot of other processing going on aside from the contact retrieval. So we're stuck here - we can't use an efficient bulk query since it throws an error, and we can't use multiple selective queries since we hit the governor limit. Does anybody have advice on how to approach selecting a set of records from a 100k+ count object?

Thanks,
Earl

Hi, we're building several sites within one org and we'd like each site to have a different Answers community. This doesn't appear to be possible in the UI. Is this a limitation? Is there a workaround? Thanks.

Since this weekend we've been getting "Query of LOB fields caused heap usage to exceed limit" from various organizations that have our AppExchange packages installed. Presumably this is due to a change to memory usage enforcement in the Winter 12 release, but I can't find any information about it in the release notes or elsewhere. Obviously, this is caused by queries returning too much data, but what specifically has changed to cause this error when it has never occurred before?

Hi. We have a managed package which includes a Visualforce page that can be used in the Service Cloud Console. Occasionally, when using the console javascript API to refresh/close tabs we get the error "Warning: The content of elements should consist of well-formed character data or markup at line 5" in a yellow warning box. This only occurs in the console in an installed org (never in the development org of the package). I looked at line 5 of the source of the page and didn't see anything strange. I found this post but it doesn't seem to be the same issue because the page cannot even be edited in installed orgs. Unfortunately, the page is too large to paste here and it includes various javascript and CSS files, but I'm hoping somebody has seen this before. Has anyone come across this warning this before? How did you narrow down the markup which the parser is complaining about? Thanks.



The sobject method clone recently received a new parameter for preserving read-only system fields like CreatedDate and LastModifiedDate. While this new argument appears to work for the cloned object immediately after the clone call itself, the values are overwritten during that new object's insertion. For example, suppose I want to clone a case to make an exact copy down to even the system fields using the following:

Case OldCase = [select Id, CreatedDate, ... from case];
Case ClonedCase = OldCase.clone(false,true,true);
Insert ClonedCase;

ClonedCase will have the current timestamp as its CreatedDate after the insertion, instead of the value from OldCase. I assumed there would be some magic involved during the insert to detect that the system fields were already set and to not overwrite them, but that's not the case. Am I misunderstanding the purpose of the preserve_readonly_timestamps argument?



Hi, it appears that when a trigger runs on a large update, salesforce chunks data into 200 record batches and executes the trigger multiple times, causing any queries in that trigger to run multiple times.  Even with our triggers fully bulkified (a single query), we're hitting the query governor limits on a 6000 record update because that single query is running 30 times. Is this chunking behavior new or has it always been like this? Is there a workaround of some sort? A simplified example follows.

 

trigger CheckBusinessHours on Case (before update) {

//this query runs for each of the 200 record chunks
BusinessHours DefaultBH = [Select id from BusinessHours where IsDefault = true];

/*
... other code, no more queries ...
*/

}

 




Hi, we're attempting to make our app compatible with the Service Cloud Console and we're running into a few issues. We have a VF override page displaying in a primary tab which then can open a VF page in subtabs as well.

1) Primary tabs display "Loading..." in the upper left and it doesn't go away even after the tab has fully loaded. Is there a way to force that to disappear?
2) When a standard page is displayed in a subtab, it has an asterisk in the tab title area indicating unsaved changes and will alert the user if they attempt to navigate away from that tab without saving. Can this behavior be replicated with the Console Integration Toolkit?

Thanks.

Hi. We have a managed package and we use the LMA for customer installations. We are considering exposing portions of the APEX globally to allow customers to clone the Visualforce pages in our package and then customize layout, fields, etc. However, we made a quick test package and it appears that the LMA does not enforce access to APEX classes that are global. Is this correct? Is there any way to enforce licenses in this case?

My organization has two custom objects, Projects and Time Entries. Projects are specific work items which are associated with an account. Time entries record workers' time spent for billing purposes and include both the account and the project. I am trying to write a VF page which allows the user to create new time entries. Once they enter an account (a lookup field), the projects select list should populate with the all the projects for that account. I think the problem is that account is not actually saved yet when I rerender the project dropdown list so the parameter I use to select the projects is null and the query returns nothing. Is there a way for the controller extension to read the value that is physically in the account box on screen, not the value that is currently stored in the associated field? Am I totally missing something simple here? Thanks in advance.

Code:
<apex:page standardcontroller="Time__c" extensions="timeExtension">

   <apex:form>
   
    <apex:pageBlock title="Time Entry Edit" mode="edit">

        <apex:pageblockbuttons >
            <apex:commandButton action="{!save}" value="Save"/>
            <apex:commandButton action="{!cancel}" value="Cancel"/>
        </apex:pageblockbuttons>
                 
        <apex:pageblocksection title="Information" columns="2">
        
            <apex:inputField required="true" value="{!Time__c.Duration__c}"/>
            <apex:inputField required="true" value="{!Time__c.Date__c}"/> 
            <apex:inputField required="true" value="{!Time__c.Service__c}"/>
            <apex:inputField value="{!Time__c.Case__c}"/> 
            <apex:inputField value="{!Time__c.Billable__c}"/>  
            
            <apex:inputField required="true" value="{!Time__c.Account__c}" id="acctBox">
            <apex:actionSupport event="onblur" rerender="Projects" status="projSelStatus"/> 
            </apex:inputField>
            
            <apex:inputField value="{!Time__c.Reason__c}"/>     
            
            <apex:outputpanel id="Projects">

                <b><apex:outputLabel value="Project" for="chooseProject"/></b>
                  
                <apex:selectList id="chooseProject" size="1" value="{!Time__c.Project__c}">
                    <apex:selectOptions value="{!ProjectArray}"/>
                </apex:selectList>
                
                <apex:actionStatus id="projSelStatus" startText="(...)" />

            </apex:outputpanel> 
            
            <apex:inputField value="{!Time__c.Export_Batch__c}"/>   
            <apex:inputField value="{!Time__c.Name}"/>   
            
        </apex:pageblocksection>
        
         <apex:pageblocksection title="Description" columns="1">
            <apex:pageblockSectionItem >
                <apex:outputLabel value="Description" for="desc"/>
                <apex:inputtextarea id="desc" required="true" cols="80" rows="4" value="{!Time__c.Description__c}"/> 
            </apex:pageblockSectionItem>
        </apex:pageblocksection>
        
        <apex:pageblocksection title="System Information" columns="1" >
            <apex:outputField value="{!Time__c.OwnerID}"/>
        </apex:pageblocksection>
       
    </apex:pageBlock> 

    </apex:form>  
 
</apex:page>


public class timeExtension { private Time__c timeEntry; List<SelectOption> ProjList = null; public List<SelectOption> getProjectArray() { ProjList = new List<SelectOption>(); SFDC_Project__c[] p; Projlist.add(new selectoption('',''));
p = [select id, SFDC_Project_Name__c, account__c from SFDC_Project__c where account__c = :timeEntry.Account__c]; if (p.size() > 0) { for(integer i = 0; i <= p.size() - 1; i++){ projlist.add(new selectoption(p[i].ID, p[i].SFDC_Project_Name__c)); } } return ProjList; } public timeExtension(ApexPages.StandardController stdController) { this.timeEntry = (Time__c)stdController.getRecord(); } }

 

Hi,

We're attempting to make a custom email publisher for Case Feed to completely replace the standard Answer Customer publisher and we're running into severe obstacles. We must be missing something with at least some of the below issues because this is seeming very developer unfriendly. Any help is greatly appreciated.

1) The VF page added to the Feed must have a static height and apex:emailPublisher widget has elements that dynamically expand/shrink on clicks. This creates whitespace under the publisher inside the page's iframe and creates an obvious gap above the actual feed. That is, unless we use javascript to automatically control or lock element sizing. Scrollbars inside of the iframe are worse. Are there any other options here?

2) In Summer 13, if you remove the standard Answer Customer publisher from the Feed then the Reply and Reply All buttons on email feed items simply don't work. In Winter 14 under the same setup, those buttons now pull the user out of the feed and send them to the native Send Email page. Ideally, since we're trying to replace the standard publisher, we'd like those buttons to take users to our custom publisher within the feed. Another acceptable option would be for the buttons to simply be removed from the email feed items when the standard publisher isn't on the feed layout. Given this behavior with the Reply buttons, how can we possibly make it so users will default to our publisher? They'd have to consistently remember to ignore the easily accessible buttons on the emails themselves and instead always choose the proper action from the left bar.

3) If we select a custom button from the "Replace Send Email Button with" menu and use the standard Answer Publisher action then we are presented with a stripped down email publisher, which sends an email, and then redirects per the button. What is the purpose of this if the email is always sent through the standard publisher anyway regardless of the override?

Thanks.

Hi,

We're attempting to make a custom email publisher for Case Feed to completely replace the standard Answer Customer publisher and we're running into severe obstacles. We must be missing something with at least some of the below issues because this is seeming very developer unfriendly. Any help is greatly appreciated.

1) The VF page added to the Feed must have a static height and apex:emailPublisher widget has elements that dynamically expand/shrink on clicks. This creates whitespace under the publisher inside the page's iframe and creates an obvious gap above the actual feed. That is, unless we use javascript to automatically control or lock element sizing. Scrollbars inside of the iframe are worse. Are there any other options here?

2) In Summer 13, if you remove the standard Answer Customer publisher from the Feed then the Reply and Reply All buttons on email feed items simply don't work. In Winter 14 under the same setup, those buttons now pull the user out of the feed and send them to the native Send Email page. Ideally, since we're trying to replace the standard publisher, we'd like those buttons to take users to our custom publisher within the feed. Another acceptable option would be for the buttons to simply be removed from the email feed items when the standard publisher isn't on the feed layout. Given this behavior with the Reply buttons, how can we possibly make it so users will default to our publisher? They'd have to consistently remember to ignore the easily accessible buttons on the emails themselves and instead always choose the proper action from the left bar.

3) If we select a custom button from the "Replace Send Email Button with" menu and use the standard Answer Publisher action then we are presented with a stripped down email publisher, which sends an email, and then redirects per the button. What is the purpose of this if the email is always sent through the standard publisher anyway regardless of the override?

Thanks.

Hi,

We have a package that needs to query numerous contacts by email address. It could be as many as 50 email addresses. Typically, we use a bulk query like:

 

Set<String> EmailSet = new Set<String>();
//EmailSet is populated
[Select Id From Contact Where Email in :EmailSet];

 This works fine in orgs with fewer than 100k contacts, but we get non-selective query errors when there are more than 100k contacts. According to Salesforce, Contact Email is indexed, so the error is likely due to the IN operator. A (poor) alternative is to query a single email address at a time, which does successfully avoid the non-selective error, but then we quickly exhaust the 100 SOQL query governor limit since there is a lot of other processing going on aside from the contact retrieval. So we're stuck here - we can't use an efficient bulk query since it throws an error, and we can't use multiple selective queries since we hit the governor limit. Does anybody have advice on how to approach selecting a set of records from a 100k+ count object?

Thanks,
Earl

Hi, it appears that when a trigger runs on a large update, salesforce chunks data into 200 record batches and executes the trigger multiple times, causing any queries in that trigger to run multiple times.  Even with our triggers fully bulkified (a single query), we're hitting the query governor limits on a 6000 record update because that single query is running 30 times. Is this chunking behavior new or has it always been like this? Is there a workaround of some sort? A simplified example follows.

 

trigger CheckBusinessHours on Case (before update) {

//this query runs for each of the 200 record chunks
BusinessHours DefaultBH = [Select id from BusinessHours where IsDefault = true];

/*
... other code, no more queries ...
*/

}

 




Hi. We have a managed package and we use the LMA for customer installations. We are considering exposing portions of the APEX globally to allow customers to clone the Visualforce pages in our package and then customize layout, fields, etc. However, we made a quick test package and it appears that the LMA does not enforce access to APEX classes that are global. Is this correct? Is there any way to enforce licenses in this case?