• Gordon Engel
  • NEWBIE
  • 449 Points
  • Member since 2015
  • Sr. Director, Customer Centric Engineering
  • Salesforce.com

  • Chatter
    Feed
  • 15
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 159
    Replies
Hello there,

For our production and testing purposes we are using several Salesforce environments connecting them via related SOAP endpoints. 

In somewhere about 4 months ago our production service become affected by significantly decreased performance of Salesforce SOAP endpoint: all queries through SOAP endpoint are responded in average 10 seconds each.
At the same time the same requests to the other Salesforce environments (via different SOAP endpoints) are responded in less then a second (~0.5s average). It is the same performance, which was observed in communication between our production service and Salesforce via SOAP before degradation described above.
Also it is quite interesting, that Salesforce portal looks working just fine: there are no visible lags in operations if they are performed directly on Salesforce site.

Since then we have tried multiple times to solve this problem with Salesforce support tea, but there is still no positive dynamic: from their position we are using SOAP on base supscription and so then they cannot support us in case of degradation of performance of the Salesforce service behind SOAP.

Here are examples of simple queries we are performing via SOAP to Salesforce database and average(for 10 requests) timing for two different endpoints:

# SF Query:
 > SELECT Id, SolutionNumber, SolutionName, SolutionNote, Technical_Document__c FROM Solution IsPublished = true AND IsReviewed = true
# Average response time for https://www.salesforce.com/services/Soap/u/20.0 
 => 10.72s
# Average response time for https://cs43.salesforce.com/services/Soap/u/20.0
 => 0.57s

# SF Query:
 > SELECT Id, MasterLabel, ParentId, SortOrder, SortStyle FROM CategoryNode ORDER BY SortOrder
# Average response time for https://www.salesforce.com/services/Soap/u/20.0
 => 10.41s
# Average response time for https://cs43.salesforce.com/services/Soap/u/20.0
 => 0.49s

# SF Query:
> SELECT Id, SolutionNumber, SolutionName, SolutionNote, Technical_Document__c, 
  (SELECT Id, Name, Description, CreatedDate, CreatedBy.FirstName, CreatedBy.LastName FROM Attachments ORDER BY CreatedDate)
  FROM Solution WHERE Id = '50150000000T6sfAAC'
# Average response time for https://www.salesforce.com/services/Soap/u/20.0
 => 10.68s
# Average response time for https://cs43.salesforce.com/services/Soap/u/20.0
 => 0.52s
 
# SF Query:
> SELECT Body, BodyLength, ContentType FROM Document WHERE Id = '01550000001QnorAAC'
# Average response time for https://www.salesforce.com/services/Soap/u/20.0
 => 10.67s
# Average response time for https://cs43.salesforce.com/services/Soap/u/20.0
 => 0.54s


And so on... We have done a lot of measurements and we are confident that all requests via SOAP to SF are performed such slow with our production endpoint only.
Tables queried above has the same contents in production and test environments, so it is not related to queried table size.
We are querying SOAP endpoint quite rare even in production (about several times in hour with bunch of 3-5 queries for a single operation: list contracts, create ticket and so on), so it this issue is also not related to some kind of high load.

Our code related to SOAP integration was not changed for about 2 years, and our infrastructure was not updated in the DC where our service is running, so it is also not related to changes on our side.

The interesting thing is that our problems with SF are started to happening after Salesforce DC outage several months ago. Not sure, but maybe there is some kind of database index or even maybe hardware issue out there?

I hope all reading this post will agree with me that this timing is not acceptable for production database even during superhigh load.

Bad thing for us is that Salesforce support team seems not interested in solving our problem. And it is realy making our customers angry, that we could not solve it for 2 month already. Can somebody suggest how can we fix this issue?

With thanks in advance and looking forward hearing your advices,
Evgeny Kabantsev.
Hello,

I create a new Site and Visualforce page form to collect survey data from a public site and insert a record into a custom object. All the records are there with complete data. The problem is that the Authorization Required displays after saving the form. Debug Log only shows which VF pages are being accessed and no error. I viewed as Admin and the authorization error referenced the ID of the record that was successfully created. I've tried every permission from Read Create to Read, Create, Edit, and Delete but same result; records are created but the error page displays.

I haven't tried to redirect from the form after completion, although rerender didn't help. I am using standardController with my custom object. Maybe I'm missing some Apex and need to write a controller? Any assistance is appreciated.
Hi All,

On 5/26/2017 I had created an email service within a new sandbox to test an email handler - everything was working just fine on that date. Then on 5/29/2017 I was no longer able to email the sandbox, receiving this error:

dhtest2@7g5j57uejkh4vt0bibcq1xco2hws8etoi9fuw21zizsshsahg.s-3l1wvmak.cs1.apex.sandbox.salesforce.com (dhtest2@7g5j57uejkh4vt0bibcq1xco2hws8etoi9fuw21zizsshsahg.s-3l1wvmak.cs1.apex.sandbox.salesforce.com)
Your message couldn't be delivered. The Domain Name System (DNS) reported that the recipient's domain does not exist.
Contact the recipient by some other means (by phone, for example) and ask them to tell their email admin that it appears that their domain isn't properly registered at their domain registrar. Give them the error details shown below. It's likely that the recipient's email admin is the only one who can fix this problem.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Diagnostic information for administrators:
Generating server: BY2PR11MB0613.namprd11.prod.outlook.com
dhtest2@7g5j57uejkh4vt0bibcq1xco2hws8etoi9fuw21zizsshsahg.s-3l1wvmak.cs1.apex.sandbox.salesforce.com
Remote Server returned '550 5.4.310 DNS domain does not exist [Message=InfoDomainNonexistent] [LastAttemptedServerName=7g5j57uejkh4vt0bibcq1xco2hws8etoi9fuw21zizsshsahg.s-3l1wvmak.cs1.apex.sandbox.salesforce.com] [CO1NAM03FT010.eop-NAM03.prod.protection.outlook.com]'

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Could this be at all related to our internal network? We didn't change antyhing..  Or does this seem like a Salesforce issue? I am surprised that within 3 days it worked and then stopped working.  Anyone have any idea or perhaps has experienced this problem before in their instance?

I reached out to support but was told that email services are a developer issue, not something support can offer assistance with (even though it's a standard functionality).  Last bit of info - no matter what I use for the apex class associated with the email service, i cannot send any emails into the sandbox.  All Email is also enabled within the sandbox.





 
Hi,
i want whenever user loign in page i need to display their languge based on user .

Note : I dont have language picklist field

thanks for advance.

Regards,
Bhanu
Hi,

I'm currently working on the "Connect to Salesforce with Server-Side Controllers" module and I'm facing an error.

The error is:
Error: An internal server error has occurred
Error ID: 615929029-122427 (-1189130377)



I already:
  • Re-wrote the code from zero
  • Checked other posts on this forum
  • Checked fields security
  • Tried to remove the "with sharing" from the Apex controller
The challenge has been marked "completed" but it doesn't work :(

I did not have any issue on the previous unit, with expenses.

Please find my code below. Do you have an idea because I'm going crazy :)

Camping.cmp:
<aura:component>
    <aura:attribute name="items" type="Camping_Item__c[]"/>
    <!-- PAGE HEADER -->
    <div class="slds-page-header" role="banner">
      <div class="slds-grid">
        <div class="slds-col">
          <p class="slds-text-heading--label">Camping items</p>
          <h1 class="slds-text-heading--medium">Items</h1>
        </div>
      </div>
    </div>
    <!-- / PAGE HEADER -->
	<c:campingList items="{!v.items}"/>
</aura:component>
campingList.cmp:
<aura:component controller="CampingListController">
	<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    <aura:attribute name="items" type="Camping_Item__c[]"/>
    <aura:attribute name="newItem" type="Camping_Item__c"
     default="{ 'sobjectType': 'Expense__c',
                    'Name': '',
                    'Price__c': 0,
                    'Quantity__c': '',
                    'Packed__c': false }"/>
    
    <!-- NEW EXPENSE FORM -->
    <div class="slds-col slds-col--padded slds-p-top--large">
  
          <div aria-labelledby="newitemform">
        
          <!-- BOXED AREA -->
          <fieldset class="slds-box slds-theme--default slds-container--small">
        
            <legend id="newItemform" class="slds-text-heading--small 
              slds-p-vertical--medium">
              Add Item
            </legend>
        
            <!-- CREATE NEW EXPENSE FORM -->
            <form class="slds-form--stacked">
        
              <div class="slds-form-element slds-is-required">
                  <div class="slds-form-element__control">
                      <ui:inputText aura:id="itemname" label="Item Name"
                          class="slds-input"
                          labelClass="slds-form-element__label"
                          value="{!v.newItem.Name}"
                          required="true"/>
                  </div>
             </div>
             <div class="slds-form-element slds-is-required">
                  <div class="slds-form-element__control">
                      <ui:inputNumber aura:id="itemprice" label="Price"
                          class="slds-input"
                          labelClass="slds-form-element__label"
                          value="{!v.newItem.Price__c}"
                          required="true"/>
        
                  </div>
              </div>
        
              <div class="slds-form-element">
                  <div class="slds-form-element__control">
                      <ui:inputNumber aura:id="itemquantity" label="Quantity"
                          class="slds-input"
                          labelClass="slds-form-element__label"
                          value="{!v.newItem.Quantity__c}"/>
                  </div>
              </div>
        
              <div class="slds-form-element">
                  <ui:inputCheckbox aura:id="itempacked" label="Packed?"
                      class="slds-checkbox"
                      labelClass="slds-form-element__label"
                      value="{!v.newItem.Packed__c}"/>
              </div>        
              <div class="slds-form-element">
                  <ui:button label="Create Item"
                      class="slds-button slds-button--brand"
                      press="{!c.clickCreateItem}"/>
              </div>
        
            </form>
            <!-- / CREATE NEW EXPENSE FORM -->
        
          </fieldset>
          <!-- / BOXED AREA -->
        
        </div>
        <!-- / CREATE NEW EXPENSE -->
    </div>    
    
    
    <div class="slds-card slds-p-top--medium">
        <header class="slds-card__header">
            <h3 class="slds-text-heading--small">Camping Items</h3>
        </header>
        
        <section class="slds-card__body">
            <div id="list" class="row">
                <aura:iteration items="{!v.items}" var="item">
                    <c:CampingItem item="{!item}"/>
                </aura:iteration>
            </div>
        </section>
    </div>

</aura:component>

CampingItem.cmp:
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c"/>
    <p>Name:
        <ui:outputText value="{!v.item.Name}"/>
    </p>
    <p>Price:
        <ui:outputNumber value="{!v.item.Price__c}"/>
    </p>
    <p>Quantity:
        <ui:outputNumber value="{!v.item.Quantity__c}"/>
    </p>
    <p>Packed?:
        <ui:outputCheckbox value="{!v.item.Packed__c}"/>
    </p>
</aura:component>
CampingListController.apxc:
public with sharing class CampingListController {

    @AuraEnabled
    public static List<Camping_Item__c> getItems() {
        // Perform isAccessible() checking first, then
        return [SELECT Name, Price__c, Quantity__c, Packed__c FROM Camping_Item__c];
    }
    
    @AuraEnabled
    public static Camping_Item__c saveItem(Camping_Item__c newItem) {
        // Perform isUpdatable() checking first, then
        upsert newItem;
        return newItem;
    }
}
campingListController.js:
({
    // Load items from Salesforce
    doInit: function(component, event, helper) {
    
        // Create the action
        var action = component.get("c.getItems");
    
        // Add callback behavior for when response is received
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (component.isValid() && state === "SUCCESS") {
                component.set("v.items", response.getReturnValue());
            }
            else {
                console.log("Failed with state: " + state);
            }
        });
    
        // Send action off to be executed
        $A.enqueueAction(action);
    },
    
    clickCreateItem: function(component, event, helper) {
        if(helper.validateItemForm(component)){
            // Create the new item
            var newItem = component.get("v.newItem");
            helper.createItem(component, newItem);
        }
    }
})

campingListHelper.js:
({
    
    validateItemForm: function(component) {
        // Simplistic error checking
        var validItem = true;
    	/*
        // Name must not be blank
        var nameField = component.find("expname");
        var expname = nameField.get("v.value");
        if ($A.util.isEmpty(expname)){
            validExpense = false;
            nameField.set("v.errors", [{message:"Expense name can't be blank."}]);
        }
        else {
            nameField.set("v.errors", null);
        }
    
        // Amount must be set, must be a positive number
        var amtField = component.find("amount");
        var amt = amtField.get("v.value");
        if ($A.util.isEmpty(amt) || isNaN(amt) || (amt <= 0.0)){
            validExpense = false;
            amtField.set("v.errors", [{message:"Enter an expense amount."}]);
        }
        else {
            // If the amount looks good, unset any errors...
            amtField.set("v.errors", null);
        }
        */
        return(validItem);
	},
    
    createItem: function(component, newItem) {
        var action = component.get("c.saveItem");
        alert(JSON.stringify(newItem));
        action.setParams({"newItem": newItem});
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "ERROR") {
                var errors = response.getError();
                if (errors && errors[0]) {
                    console.log(errors[0]);
                }
                else {
                    console.log("Unknown error");
                }
            }            
            else if (component.isValid() && state === "SUCCESS") {
                var items = component.get("v.items");
                items.push(response.getReturnValue());
                component.set("v.items", items);
            }
        });
        $A.enqueueAction(action);
    }
})
Thanks  !





 
Users are occasionally getting an error message within our new integrated softphone agent saying "Error in executing apex method". The agent is the standard app from inContact with no additional customization. We were directed by inContact to "change our configured limit for apex method execution" but I do not know how to do that. Any advice?
Please help! We have Salesforce Shield. The Transaction Security feature automatically creates two Apex Classes that are used for Transaction Security Policies. They are:
  1. ConcurrentSessionsPolicyCondition
  2. DataLoaderLeadExportCondition
These are two of the three Apex Classes I have in a new org. I am trying to deploy the test class of the third Apex Class, which is a controller I wrote, but forget to deploy the Test Class with it.

Those two Apex Classes created by Salesforce Shield do not have Test Classes created with them. Why is this? It results in a very low code coverage and I cannot deploy to our Production org as a result.
Hi, 

Does REST API work for Person X, if Person X do not have any SalesForce user?
Is there any case of REST API use, which do not consumes (requires) SalesForce licence?

Thank you in advance.
Kind regards.
I have a scenerio where two player  , lets call them player1 and player2,they get connected with the same vf page , which contains data from two different object corresponding to each player. I want to know if the player1 can get his vf page refreshed if player 2 updates his object reference .I want to know if notification like this is possible . Also if this is possible, i want to know ,if  multicasting is also possible when n player access a same vf page ? This will help me create a tic tac toe game in salesforce
お世話になっております

もしAが○だったらエラーを出す入力規則を作りたいと思っています
このような場合どういう数式を使えばできるのでしょうか
IFを使うのはなんとなく分かるのですが... 

基礎的な質問で申し訳ありませんが教えてくださると助かります
宜しくお願いします
Hello ohana. Like many others, I created an IFTTT recipe to be notified of any degradation in service. Its worked well for years. Today we all received an email indicating that the RSS will be depracated in favor of a REST API.

With RSS, it was easy for me to "push" the information about an outage to me. Now with REST, I can't seem to understand how to replicate the same behavior. 

Perhaps it's because I am not a developer. Seems silly to hire a developer in order to get notified of outages. No?  

Any developers out there that can help me put something together to replicate the old behavior in the new REST API?
The page 'cancel' button has an onclick redirectpage.
Now, when I click the cancel button nothing happens.

<apex:commandbutton id="cmdCancel" value="{!$Label.Button_Cancel}" onclick="javascript: RedirectPage();"/>  

From Chrome: Uncaught TypeError: Cannot read property 'focus' of undefined  

From Mozilla Firefox: Instance 'backToSuggestionsLnk_500e0000006P9rj-18ed8e4b6c5de6fb024519190e0bef26150816a7a90zf04126a57303ae4d' is uninitialized and type was undefined"
  • October 19, 2015
  • Like
  • 0
Hello All,
I came across a very weird issue. In my test method, I'm running into a too many soql queries exception before even setting up my test data for a use case. So, I've moved Test.startTest() little bit upwards before the line causing 101th query hoping startTest() method will reset the limits. Surprisingly, it was still running into the same too many soql exceptions. So, I put a debug log to get total soql queries before the line that's causing the error. This time, with the debug, it doesn't throw any error. If I remove the debug, then it will run into too many soql queries.

My code:

insert somList;//This is the point I hit my 100th query. So the next query will be 101th.
System.debug(logginglevel.error, '***SOQL Count 1***'+limits.getQueries());//The debug prints 100.
Test.startTest();
System.debug(logginglevel.error, '***SOQL Count 2***'+limits.getQueries());// This debug is doing magic. If I put the debug, queries count resets. Otherwise it doesn't
List<Account> listAcnts= [SELECT ID, Name FROM Account WHERE xxxxx];//This would be the 101th query if there is no startTest() above.

Any thoughts?

Thanks,
Avinash.

 
When I click "create subscription"  I am getting this error. I am not fimiliar with this one and I really could use a hand.

Account SavezObject:[Id=null, arrayfields={}, fields={Code=MISSING_REQUIRED_VALUE, Message=Missing required value: OEM_Brands__c__c}, ztype=Error]

Thanks!
When trying to execute the below SOQL query in Anonymous window under developer console, the query is failing with some Oracle exceptions. Based on the error, I can understand that this has to do something with datetime fields, so when I remove Call_Back_Time__c from the where clause of the query it executes fine. And the same SOQL executes absolutely fine in Summer 15 sandbox org.

Query:
List<Work_Item__c> wi = [Select Id, Priority__c, Response__r.Contact__c, Response__r.Contact__r.Assigned__c, Response__c, Response__r.Unit_of_Interest__c, Response__r.Unit_of_Interest__r.Assigned__c from Work_Item__c where Status__c = 'New' and Delivery_Mode__c = 'Call' and Response__r.RecordType.Name = 'Business Response' and Response__r.Contact__r.Assigned__c = false and Response__r.Unit_of_Interest__c != NULL and Response__r.Unit_of_Interest__r.Assigned__c = false  and Call_Back_Time__c  != NULL and Call_Back_Time__c <= :system.now() and ownerId = '005q0000001JFyJAAW' order by Call_Back_Time__c limit 1];

Error:
System.UnexpectedException: common.exception.SfdcSqlException: ORA-01841: (full) year must be between -4713 and +9999, and not be 0

select /*Apex.Class.WorkItemQueue.fetchWorkItem: line 26*/ *
from (select "Id",
"Priority__c",
"Response__c"
from (select /*+ ordered index(t iecustom_entity_data_owner) use_nl(t_c41) use_nl(t_c41_6) use_nl(t_c41_c9) use_nl(t_c41_c5) use_nl(cft_c41_c5) index(cft_c41_c5 PKCONTACT_CFDATA) */
t.deleted "IsDeleted_gen_1",
t_c41.deleted "IsDeleted_gen_2",
t_c41_c5.deleted "IsDeleted_gen_3",
t_c41_c9.deleted "IsDeleted_gen_4",
t.val7 "Status__c",
t.val48 "Delivery_Mode__c",
t_c41_6.name "t_c41_6_Name",
cft_c41_c5.val59 "t_c41_c5_Assigned__c",
t_c41.val9 "t_c41_Unit_of_Interest__c",
t_c41_c9.val156 "t_c41_c9_Assigned__c",
TO_DATE(t.val58) "Call_Back_Time__c",
t.owner "OwnerId",
t.custom_entity_data_id "Id",
TO_NUMBER(t.val4) "Priority__c",
t.val41 "Response__c"
from core.custom_entity_data t,
core.custom_entity_data t_c41,
core.record_type t_c41_6,
core.custom_entity_data t_c41_c9,
sales.contact t_c41_c5,
sales.contact_cfdata cft_c41_c5
where (t.val41 = t_c41.custom_entity_data_id)
and (t_c41.record_type_id = t_c41_6.record_type_id)
and (t_c41.val9 = t_c41_c9.custom_entity_data_id(+))
and (t_c41.val5 = t_c41_c5.contact_id(+))
and (t_c41_c5.contact_id = cft_c41_c5.contact_cfdata_id(+))
and (t.organization_id = '00Dq0000000Ai3k')
and (t.custom_entity_data_id != '000000000000000')
and (t.key_prefix = ?)
and (t_c41.organization_id = '00Dq0000000Ai3k')
and (t_c41.custom_entity_data_id != '000000000000000')
and (t_c41.key_prefix = ?)
and (t_c41_6.organization_id = '00Dq0000000Ai3k')
and (t_c41_6.deleted = '0')
and (t_c41_6.table_enum_or_id not in ('Idea', 'Question', 'Reply')
or t_c41_6.table_enum_or_id is null)
and (t_c41_c9.organization_id(+) = '00Dq0000000Ai3k')
and (t_c41_c9.key_prefix(+) = ?)
and (t_c41_c5.organization_id(+) = '00Dq0000000Ai3k')
and (cft_c41_c5.organization_id(+) = '00Dq0000000Ai3k'))
where (("IsDeleted_gen_1" = '0')
AND ("IsDeleted_gen_2" = '0')
AND (nvl("IsDeleted_gen_3",'0') <> '1')
AND (nvl("IsDeleted_gen_4",'0') <> '1')
AND ("Status__c" = ?)
AND ("Delivery_Mode__c" = ?)
AND (upper("t_c41_6_Name") = ?)
AND (nvl("t_c41_c5_Assigned__c",'0') <> '1')
AND ("t_c41_Unit_of_Interest__c" is not null and "t_c41_Unit_of_Interest__c" > '000000000000000')
AND (nvl("t_c41_c9_Assigned__c",'0') <> '1')
AND ("Call_Back_Time__c" <= to_date(?))
AND ("OwnerId" = ?))
order by "Call_Back_Time__c" asc nulls first)
where rownum <= ?
14:11:43.102 (102006532)|HEAP_ALLOCATE|[26]|Bytes:2473
14:11:43.102 (102053402)|METHOD_EXIT|[8]|01pq0000000Ad4T|WorkItemQueue.fetchWorkItem()
14:11:43.102 (102068549)|SYSTEM_MODE_EXIT|false
14:11:43.102 (102162687)|FATAL_ERROR|System.UnexpectedException: common.exception.SfdcSqlException: ORA-01841: (full) year must be between -4713 and +9999, and not be 0


select /*Apex.Class.WorkItemQueue.fetchWorkItem: line 26*/ *
from (select "Id",
"Priority__c",
"Response__c"
from (select /*+ ordered index(t iecustom_entity_data_owner) use_nl(t_c41) use_nl(t_c41_6) use_nl(t_c41_c9) use_nl(t_c41_c5) use_nl(cft_c41_c5) index(cft_c41_c5 PKCONTACT_CFDATA) */
t.deleted "IsDeleted_gen_1",
t_c41.deleted "IsDeleted_gen_2",
t_c41_c5.deleted "IsDeleted_gen_3",
t_c41_c9.deleted "IsDeleted_gen_4",
t.val7 "Status__c",
t.val48 "Delivery_Mode__c",
t_c41_6.name "t_c41_6_Name",
cft_c41_c5.val59 "t_c41_c5_Assigned__c",
t_c41.val9 "t_c41_Unit_of_Interest__c",
t_c41_c9.val156 "t_c41_c9_Assigned__c",
TO_DATE(t.val58) "Call_Back_Time__c",
t.owner "OwnerId",
t.custom_entity_data_id "Id",
TO_NUMBER(t.val4) "Priority__c",
t.val41 "Response__c"
from core.custom_entity_data t,
core.custom_entity_data t_c41,
core.record_type t_c41_6,
core.custom_entity_data t_c41_c9,
sales.contact t_c41_c5,
sales.contact_cfdata cft_c41_c5
where (t.val41 = t_c41.custom_entity_data_id)
and (t_c41.record_type_id = t_c41_6.record_type_id)
and (t_c41.val9 = t_c41_c9.custom_entity_data_id(+))
and (t_c41.val5 = t_c41_c5.contact_id(+))
and (t_c41_c5.contact_id = cft_c41_c5.contact_cfdata_id(+))
and (t.organization_id = '00Dq0000000Ai3k')
and (t.custom_entity_data_id != '000000000000000')
and (t.key_prefix = ?)
and (t_c41.organization_id = '00Dq0000000Ai3k')
and (t_c41.custom_entity_data_id != '000000000000000')
and (t_c41.key_prefix = ?)
and (t_c41_6.organization_id = '00Dq0000000Ai3k')
and (t_c41_6.deleted = '0')
and (t_c41_6.table_enum_or_id not in ('Idea', 'Question', 'Reply')
or t_c41_6.table_enum_or_id is null)
and (t_c41_c9.organization_id(+) = '00Dq0000000Ai3k')
and (t_c41_c9.key_prefix(+) = ?)
and (t_c41_c5.organization_id(+) = '00Dq0000000Ai3k')
and (cft_c41_c5.organization_id(+) = '00Dq0000000Ai3k'))
where (("IsDeleted_gen_1" = '0')
AND ("IsDeleted_gen_2" = '0')
AND (nvl("IsDeleted_gen_3",'0') <> '1')
AND (nvl("IsDeleted_gen_4",'0') <> '1')
AND ("Status__c" = ?)
AND ("Delivery_Mode__c" = ?)
AND (upper("t_c41_6_Name") = ?)
AND (nvl("t_c41_c5_Assigned__c",'0') <> '1')
AND ("t_c41_Unit_of_Interest__c" is not null and "t_c41_Unit_of_Interest__c" > '000000000000000')
AND (nvl("t_c41_c9_Assigned__c",'0') <> '1')
AND ("Call_Back_Time__c" <= to_date(?))
AND ("OwnerId" = ?))
order by "Call_Back_Time__c" asc nulls first)
where rownum <= ?
 

Trying to connect to Open CTI library in sandbox using visualforce pages to only leverage the below functions from the library:
1) sforce.opencti.hvs.onWorkStart
2) sforce.opencti.hvs.completeWork
 

Visualforce Page Documentation:
1) <script src="/support/api/50.0/lightning/opencti_min.js" type="text/javascript"></script>

  • Error: "Uncaught Failed to initialize Open CTI. Ensure that it is loaded from the right frame with correct URL parameters"


Third Party Domain Documentation
1) <script src="https://<<MyDomainName>>--<<Sandboxname>>--<<PackageName>>.visualforce.com/support/api/50.0/lightning/opencti_min.js" type="text/javascript"></script>

  • Error: Uncaught Failed to initialize Open CTI. Ensure that it is loaded from the right frame with correct URL parameters

2) We are correctly putting the MyDomainName--Sandbox, is there a separate package that needs to be installed in the org for opencti_min.js to work? 

 

So all the above script tags have been tried out and we are still facing the error "Uncaught Failed to initialize Open CTI. Ensure that it is loaded from the right frame with correct URL parameters", we have exhausted the search results regarding this issue and the documentation does not mention anything regarding loading it from the right frame and also any parameters that needs to be called when loading the javascript 'opencti_min.js' file.

Looking forward towards a detailed explaination as to where to include parameters if needed and how to include them as well, and also where can I include this visualforce page in the page layout to only do one job which is to leverage the two HVS methods: completeWork and onWorkStart?
 

What all needs to be checked/tested as a Salesforce developer when an Salesforce org gets upgraded due to scheduled maintenance Spring 21
I've been holding at least 10 minutes while the "robots" build my Trailhead playground. Is anyone else experiencing this same delay?
Hello there,

For our production and testing purposes we are using several Salesforce environments connecting them via related SOAP endpoints. 

In somewhere about 4 months ago our production service become affected by significantly decreased performance of Salesforce SOAP endpoint: all queries through SOAP endpoint are responded in average 10 seconds each.
At the same time the same requests to the other Salesforce environments (via different SOAP endpoints) are responded in less then a second (~0.5s average). It is the same performance, which was observed in communication between our production service and Salesforce via SOAP before degradation described above.
Also it is quite interesting, that Salesforce portal looks working just fine: there are no visible lags in operations if they are performed directly on Salesforce site.

Since then we have tried multiple times to solve this problem with Salesforce support tea, but there is still no positive dynamic: from their position we are using SOAP on base supscription and so then they cannot support us in case of degradation of performance of the Salesforce service behind SOAP.

Here are examples of simple queries we are performing via SOAP to Salesforce database and average(for 10 requests) timing for two different endpoints:

# SF Query:
 > SELECT Id, SolutionNumber, SolutionName, SolutionNote, Technical_Document__c FROM Solution IsPublished = true AND IsReviewed = true
# Average response time for https://www.salesforce.com/services/Soap/u/20.0 
 => 10.72s
# Average response time for https://cs43.salesforce.com/services/Soap/u/20.0
 => 0.57s

# SF Query:
 > SELECT Id, MasterLabel, ParentId, SortOrder, SortStyle FROM CategoryNode ORDER BY SortOrder
# Average response time for https://www.salesforce.com/services/Soap/u/20.0
 => 10.41s
# Average response time for https://cs43.salesforce.com/services/Soap/u/20.0
 => 0.49s

# SF Query:
> SELECT Id, SolutionNumber, SolutionName, SolutionNote, Technical_Document__c, 
  (SELECT Id, Name, Description, CreatedDate, CreatedBy.FirstName, CreatedBy.LastName FROM Attachments ORDER BY CreatedDate)
  FROM Solution WHERE Id = '50150000000T6sfAAC'
# Average response time for https://www.salesforce.com/services/Soap/u/20.0
 => 10.68s
# Average response time for https://cs43.salesforce.com/services/Soap/u/20.0
 => 0.52s
 
# SF Query:
> SELECT Body, BodyLength, ContentType FROM Document WHERE Id = '01550000001QnorAAC'
# Average response time for https://www.salesforce.com/services/Soap/u/20.0
 => 10.67s
# Average response time for https://cs43.salesforce.com/services/Soap/u/20.0
 => 0.54s


And so on... We have done a lot of measurements and we are confident that all requests via SOAP to SF are performed such slow with our production endpoint only.
Tables queried above has the same contents in production and test environments, so it is not related to queried table size.
We are querying SOAP endpoint quite rare even in production (about several times in hour with bunch of 3-5 queries for a single operation: list contracts, create ticket and so on), so it this issue is also not related to some kind of high load.

Our code related to SOAP integration was not changed for about 2 years, and our infrastructure was not updated in the DC where our service is running, so it is also not related to changes on our side.

The interesting thing is that our problems with SF are started to happening after Salesforce DC outage several months ago. Not sure, but maybe there is some kind of database index or even maybe hardware issue out there?

I hope all reading this post will agree with me that this timing is not acceptable for production database even during superhigh load.

Bad thing for us is that Salesforce support team seems not interested in solving our problem. And it is realy making our customers angry, that we could not solve it for 2 month already. Can somebody suggest how can we fix this issue?

With thanks in advance and looking forward hearing your advices,
Evgeny Kabantsev.
Hi,  I have been spending a lot of time trying to export ContentVersion records OUT of salesforce.  I did not realize this would be such a challenge.

I was doing this in batch apex and it worked but quickly ran out of heap space as there are files larger than 12MB (largest file is 500MB).

I then went to the Java Bulk API as I was made aware that the same heap space limitations did not exist however for files that are large (not sure what the cut off is as of yet) I seem to be getting a reply of: InternalServerError : Failed to write query result".

Does anyone know how to get around this, or in general how to export (programmatically) contentVersion data as I am looking to pull it out of Salesforce and push it into another cloud based system.

Any help would be greatly appreciated as I have been at this for quite some time :(
  • June 22, 2017
  • Like
  • 0
Hello,

I am trying to do the Customize Compact Layouts section of the SalesForce1 Mobile Customization Module and I get this:

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: IFKBCXNH

Is there any other information that you require for troubleshooting?
 
I'm working on the "Becoming Salesforce" modules in Trailhead; something I've noticed is that it seems I can only see the first topic for a few of the modules; for example: in the "Get to know Salesforce.org" module, I see the "Giving Back at Salesforce" topic with the video with Ebony, but topics after and including "Salesforce.org and Our Philanthropic Model" aren't showing up. If I click on the missing topics in the right-hand topic navigation links, nothing happens. The quiz directly follows the "Giving Back at Salesforce", and the last question in the quiz references content that I can't find anywhere. This is what ultimately led me to discover that topics were missing.
 
Here's an exhaustive list of the modules that I see this issue with (i.e. topics after the first topic don't show up in the main page):
  1. "Get Started Becoming Salesforce"
  2. "Learn About Our Ohana Culture"
  3. "Get to know Salesforce.org"
I have searched through the spring 17 documentation, and am not able to determine how to disable the log in feature in communities. How do we disable this feature? we have a requirement to not allow anyone to log into communties-is this possible?
Hi - I'm trying to run this script in my sandbox and getting "SESSION_ID_REMOVED" result
------
String sessionId = UserInfo.getSessionId();
system.debug('--- Session Id Value ---'+sessionId);
------
 
Hi Guys

I have an external server with a customer table. I have replicated the table with the attribute fields in my salesforce app. Now I want to populate the customer object in my salesforce app with the data in the server using REST API. 

Please let me know the step by step instruction to do it. Any code would really help.

Thanks in advance.
Hi All,

On 5/26/2017 I had created an email service within a new sandbox to test an email handler - everything was working just fine on that date. Then on 5/29/2017 I was no longer able to email the sandbox, receiving this error:

dhtest2@7g5j57uejkh4vt0bibcq1xco2hws8etoi9fuw21zizsshsahg.s-3l1wvmak.cs1.apex.sandbox.salesforce.com (dhtest2@7g5j57uejkh4vt0bibcq1xco2hws8etoi9fuw21zizsshsahg.s-3l1wvmak.cs1.apex.sandbox.salesforce.com)
Your message couldn't be delivered. The Domain Name System (DNS) reported that the recipient's domain does not exist.
Contact the recipient by some other means (by phone, for example) and ask them to tell their email admin that it appears that their domain isn't properly registered at their domain registrar. Give them the error details shown below. It's likely that the recipient's email admin is the only one who can fix this problem.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Diagnostic information for administrators:
Generating server: BY2PR11MB0613.namprd11.prod.outlook.com
dhtest2@7g5j57uejkh4vt0bibcq1xco2hws8etoi9fuw21zizsshsahg.s-3l1wvmak.cs1.apex.sandbox.salesforce.com
Remote Server returned '550 5.4.310 DNS domain does not exist [Message=InfoDomainNonexistent] [LastAttemptedServerName=7g5j57uejkh4vt0bibcq1xco2hws8etoi9fuw21zizsshsahg.s-3l1wvmak.cs1.apex.sandbox.salesforce.com] [CO1NAM03FT010.eop-NAM03.prod.protection.outlook.com]'

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Could this be at all related to our internal network? We didn't change antyhing..  Or does this seem like a Salesforce issue? I am surprised that within 3 days it worked and then stopped working.  Anyone have any idea or perhaps has experienced this problem before in their instance?

I reached out to support but was told that email services are a developer issue, not something support can offer assistance with (even though it's a standard functionality).  Last bit of info - no matter what I use for the apex class associated with the email service, i cannot send any emails into the sandbox.  All Email is also enabled within the sandbox.





 
Hi,

I'm currently working on the "Connect to Salesforce with Server-Side Controllers" module and I'm facing an error.

The error is:
Error: An internal server error has occurred
Error ID: 615929029-122427 (-1189130377)



I already:
  • Re-wrote the code from zero
  • Checked other posts on this forum
  • Checked fields security
  • Tried to remove the "with sharing" from the Apex controller
The challenge has been marked "completed" but it doesn't work :(

I did not have any issue on the previous unit, with expenses.

Please find my code below. Do you have an idea because I'm going crazy :)

Camping.cmp:
<aura:component>
    <aura:attribute name="items" type="Camping_Item__c[]"/>
    <!-- PAGE HEADER -->
    <div class="slds-page-header" role="banner">
      <div class="slds-grid">
        <div class="slds-col">
          <p class="slds-text-heading--label">Camping items</p>
          <h1 class="slds-text-heading--medium">Items</h1>
        </div>
      </div>
    </div>
    <!-- / PAGE HEADER -->
	<c:campingList items="{!v.items}"/>
</aura:component>
campingList.cmp:
<aura:component controller="CampingListController">
	<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    <aura:attribute name="items" type="Camping_Item__c[]"/>
    <aura:attribute name="newItem" type="Camping_Item__c"
     default="{ 'sobjectType': 'Expense__c',
                    'Name': '',
                    'Price__c': 0,
                    'Quantity__c': '',
                    'Packed__c': false }"/>
    
    <!-- NEW EXPENSE FORM -->
    <div class="slds-col slds-col--padded slds-p-top--large">
  
          <div aria-labelledby="newitemform">
        
          <!-- BOXED AREA -->
          <fieldset class="slds-box slds-theme--default slds-container--small">
        
            <legend id="newItemform" class="slds-text-heading--small 
              slds-p-vertical--medium">
              Add Item
            </legend>
        
            <!-- CREATE NEW EXPENSE FORM -->
            <form class="slds-form--stacked">
        
              <div class="slds-form-element slds-is-required">
                  <div class="slds-form-element__control">
                      <ui:inputText aura:id="itemname" label="Item Name"
                          class="slds-input"
                          labelClass="slds-form-element__label"
                          value="{!v.newItem.Name}"
                          required="true"/>
                  </div>
             </div>
             <div class="slds-form-element slds-is-required">
                  <div class="slds-form-element__control">
                      <ui:inputNumber aura:id="itemprice" label="Price"
                          class="slds-input"
                          labelClass="slds-form-element__label"
                          value="{!v.newItem.Price__c}"
                          required="true"/>
        
                  </div>
              </div>
        
              <div class="slds-form-element">
                  <div class="slds-form-element__control">
                      <ui:inputNumber aura:id="itemquantity" label="Quantity"
                          class="slds-input"
                          labelClass="slds-form-element__label"
                          value="{!v.newItem.Quantity__c}"/>
                  </div>
              </div>
        
              <div class="slds-form-element">
                  <ui:inputCheckbox aura:id="itempacked" label="Packed?"
                      class="slds-checkbox"
                      labelClass="slds-form-element__label"
                      value="{!v.newItem.Packed__c}"/>
              </div>        
              <div class="slds-form-element">
                  <ui:button label="Create Item"
                      class="slds-button slds-button--brand"
                      press="{!c.clickCreateItem}"/>
              </div>
        
            </form>
            <!-- / CREATE NEW EXPENSE FORM -->
        
          </fieldset>
          <!-- / BOXED AREA -->
        
        </div>
        <!-- / CREATE NEW EXPENSE -->
    </div>    
    
    
    <div class="slds-card slds-p-top--medium">
        <header class="slds-card__header">
            <h3 class="slds-text-heading--small">Camping Items</h3>
        </header>
        
        <section class="slds-card__body">
            <div id="list" class="row">
                <aura:iteration items="{!v.items}" var="item">
                    <c:CampingItem item="{!item}"/>
                </aura:iteration>
            </div>
        </section>
    </div>

</aura:component>

CampingItem.cmp:
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c"/>
    <p>Name:
        <ui:outputText value="{!v.item.Name}"/>
    </p>
    <p>Price:
        <ui:outputNumber value="{!v.item.Price__c}"/>
    </p>
    <p>Quantity:
        <ui:outputNumber value="{!v.item.Quantity__c}"/>
    </p>
    <p>Packed?:
        <ui:outputCheckbox value="{!v.item.Packed__c}"/>
    </p>
</aura:component>
CampingListController.apxc:
public with sharing class CampingListController {

    @AuraEnabled
    public static List<Camping_Item__c> getItems() {
        // Perform isAccessible() checking first, then
        return [SELECT Name, Price__c, Quantity__c, Packed__c FROM Camping_Item__c];
    }
    
    @AuraEnabled
    public static Camping_Item__c saveItem(Camping_Item__c newItem) {
        // Perform isUpdatable() checking first, then
        upsert newItem;
        return newItem;
    }
}
campingListController.js:
({
    // Load items from Salesforce
    doInit: function(component, event, helper) {
    
        // Create the action
        var action = component.get("c.getItems");
    
        // Add callback behavior for when response is received
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (component.isValid() && state === "SUCCESS") {
                component.set("v.items", response.getReturnValue());
            }
            else {
                console.log("Failed with state: " + state);
            }
        });
    
        // Send action off to be executed
        $A.enqueueAction(action);
    },
    
    clickCreateItem: function(component, event, helper) {
        if(helper.validateItemForm(component)){
            // Create the new item
            var newItem = component.get("v.newItem");
            helper.createItem(component, newItem);
        }
    }
})

campingListHelper.js:
({
    
    validateItemForm: function(component) {
        // Simplistic error checking
        var validItem = true;
    	/*
        // Name must not be blank
        var nameField = component.find("expname");
        var expname = nameField.get("v.value");
        if ($A.util.isEmpty(expname)){
            validExpense = false;
            nameField.set("v.errors", [{message:"Expense name can't be blank."}]);
        }
        else {
            nameField.set("v.errors", null);
        }
    
        // Amount must be set, must be a positive number
        var amtField = component.find("amount");
        var amt = amtField.get("v.value");
        if ($A.util.isEmpty(amt) || isNaN(amt) || (amt <= 0.0)){
            validExpense = false;
            amtField.set("v.errors", [{message:"Enter an expense amount."}]);
        }
        else {
            // If the amount looks good, unset any errors...
            amtField.set("v.errors", null);
        }
        */
        return(validItem);
	},
    
    createItem: function(component, newItem) {
        var action = component.get("c.saveItem");
        alert(JSON.stringify(newItem));
        action.setParams({"newItem": newItem});
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "ERROR") {
                var errors = response.getError();
                if (errors && errors[0]) {
                    console.log(errors[0]);
                }
                else {
                    console.log("Unknown error");
                }
            }            
            else if (component.isValid() && state === "SUCCESS") {
                var items = component.get("v.items");
                items.push(response.getReturnValue());
                component.set("v.items", items);
            }
        });
        $A.enqueueAction(action);
    }
})
Thanks  !





 
Please help! We have Salesforce Shield. The Transaction Security feature automatically creates two Apex Classes that are used for Transaction Security Policies. They are:
  1. ConcurrentSessionsPolicyCondition
  2. DataLoaderLeadExportCondition
These are two of the three Apex Classes I have in a new org. I am trying to deploy the test class of the third Apex Class, which is a controller I wrote, but forget to deploy the Test Class with it.

Those two Apex Classes created by Salesforce Shield do not have Test Classes created with them. Why is this? It results in a very low code coverage and I cannot deploy to our Production org as a result.
This question involves APEX triggers and APIs so I'm hoping someone can help. I've been SFDC admin and developer for over a decade but this one has me stumped.

My reps are getting flooded by SFDC generated contact transfer notifications and I have no idea how to stop them. Here' the order of events:
1) lead imported to Marketo
2) lead syncs with SFDC
3) SFDC Assignment rules applied (FYI, no email templates are used in this step)
4) Lead auto convereted by trigger and attched to Account
5) New Contact owner changed to match Account owner by trigger

There are no workflow or notification settings that I can see that would create a transfer notification...and here's the really wierd part. If I do all of the above steps, except start it by manually creating a lead in the SFDC UI, then no notification is sent. This only happens when the lead is injected from Marketo. That said, I am 100% sure the notification is sent from SFDC because I checked the email headers. So I think the answer must have something to do with some sort of API / trigger combination. Below is a copy of one of the transfer notifications.

All ideas for making this stop are welcome. Thank you very much.

-Derek

Subject: Contact transferred to you.
Body: Contact [NAME] has been assigned to you. Please click on the link below to view the record.
 
This question involves APEX triggers and APIs so I'm hoping someone can help. I've been SFDC admin and developer for over a decade but this one has me stumped.

My reps are getting flooded by SFDC generated contact transfer notifications and I have no idea how to stop them. Here' the order of events:
1) lead imported to Marketo
2) lead syncs with SFDC
3) SFDC Assignment rules applied (FYI, no email templates are used in this step)
4) Lead auto convereted by trigger and attched to Account
5) New Contact owner changed to match Account owner by trigger

There are no workflow or notification settings that I can see that would create a transfer notification...and here's the really wierd part. If I do all of the above steps, except start it by manually creating a lead in the SFDC UI, then no notification is sent. This only happens when the lead is injected from Marketo. That said, I am 100% sure the notification is sent from SFDC because I checked the email headers. So I think the answer must have something to do with some sort of API / trigger combination. Below is a copy of one of the transfer notifications.

All ideas for making this stop are welcome. Thank you very much.

-Derek

Subject: Contact transferred to you.
Body: Contact [NAME] has been assigned to you. Please click on the link below to view the record.