• Kirill_Yunussov
  • NEWBIE
  • 155 Points
  • Member since 2011
  • Applications Developer
  • Mainline

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 5
    Likes Given
  • 35
    Questions
  • 115
    Replies

I just upgraded my Standard version.  Supposedly, this will only be active today and tomorrow 4/14, so hurry up and get it.  $64 if without promo.

https://www.genuitec.com/coupon/mefree2014/
If you have a test class with multiple test methods in it, and some static member along with a static initializer, then 
1) Test methods will run in no particular order (i'm sure you knew this one already).
2) Static members are nulled out for each test method being run.
3) Static initializer runs for every test method, instead of just once for the class.
4) Governor limits are reset for every test method.
5) Governor limits are shared by the test method and static initializer.

So question: is #2 and #3 - expected behavior or a bug?

When will this version be available for download?

I need to run some apex off of changes in OpportunitySplits, but this object does not seem to be available for Trigger creation.   Any workarounds?

Have some trouble deploying leadSource and Industry picklists via Metadata API.   Had to comment out both of them from the build.  It may have something to do with these picklists being shared by multiple objects, I don't know.   We are using Jenkins for the deployment.  Here is a sample deployment error:

 

Error: objects/Lead.object(1150,13):An unexpected error occurred. Please include this ErrorId if you contact support: 1967816892-11483 (1554758315)

Query optimization: if you add "Limit 1", it will stop searching after finding the first match.   Now, if you specify an ID in the WHERE clause, then the search will already be quick, since ID is indexed.

 

Question: what is the performance gain of using "LIMIT 1" when quering for record with a specific ID?   Would it be a best practice?

I only know how to create these via UI, and am having trouble finding this info on the internet.  Please and thanks

 

Needed for:  

1) Have multiple developer/sandbox orgs, and need to create custom settings in each using an apex script, vs manually via UI.

2) Test Method best practice:  to use custom settings you have to use the seeAllData=true, OR you have to create these Custom Settings in your test class.  Is that even possible and how do you do that? 

 

Also, let me clarify - I am asking not about instances of existing custom settings, but  how to create an actual new Custom Settings classes/types programmatically.

 We are having some issues with the LeadSource field. It's a standard field that is shared by four standard objects - CampaignMember, Lead, Contact, and Opportunity. We are using Subversion and Jenkins, and get the following errors when Jenkins tries to deploy the code into an org. 

 

 

Error: objects/CampaignMember.object(40,13):An unexpected error occurred. Please include this ErrorId if you contact support: 702919098-115597 (21090395)
Error: objects/Contact.object(653,13):An unexpected error occurred. Please include this ErrorId if you contact support: 702919098-115598 (21090395)
Error: objects/Lead.object(194,13):An unexpected error occurred. Please include this ErrorId if you contact support: 702919098-115599 (21090395)
Error: objects/Opportunity.object(493,13):An unexpected error occurred. Please include this ErrorId if you contact support: 702919098-115600 (21090395)

 

 

It is deployable if we comment out all references to the LeadSource field in the object files.   

 

Have you encountered this issue before?  We'd rather not comment out this field.

Please vote on this idea to make that field bigger.   There is a similar idea out there, but it's marked as already delivered.  This must be a regression bug, need them to fix it again.

 

https://success.salesforce.com/ideaView?id=08730000000kqkDAAQ

 

 

 

 

Need to save a class that is 1500 lines long.  This class used to be 1800 lines long, and was saving fine before.  

When I try to save it in SF UI, it times out with the following error: 

Time Limit exceeded.


When I try to save it via Force.com IDE in MyEclipse, it created a deployment into Sandbox (visible in UI under Setup > Deploy > Monitor Deployments), and sits there with an "In Progress" status for 40 minutes.  After 40 minutes it goes into "Completed with Errors" status.

While it's saving the class in IDE, the whole org gets locked, and nobody is able to edit/save any classes during that time.  The error they get at that time is:

Organization Administration Locked

The changes you requested require salesforce.com to temporarily lock your organization's administration setup. However, the administration setup has already been locked by another change. Please wait for the previous action to finish, then try again later. 

I have encountered this before but now want to know what's going on: 

A boolean class-level variable, declared as follows, and initialized on page load, is not showing up in the View State's list of variables.

 

public boolean isChecked {get;set;}

.....

   isChecked = true;

 

Why is it not showing up in there?   A bunch of other booleans I have are in the View State, and I don't see any differences in declaration or usage.

 

 

As far as I know, you can only specify the "email-to" addresses, but not the names.  As a result, Salesforce sends the email to   "persons.name@domain.com"<persons.name@domain.com>, which is a red flag for some spam filters.  

 

How can I send the email to "Persons Name"<persons.name@domain.com>?

For some reason I cannot query any fields other than ID via API for a few recently created custom objects.   I am using Entersprise WSDL, and a simple  query of "select id, name from my_custom_object__c".

 

The result is this error:  org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - Name

 

 

If I try to pull only the ID, then there are no issues.  

 

I have checked the permissions for this new object, and there seems to be no problems there - visible to all.

 

 

Simple query, taking 1 minute in the VF page controller, and less than 1 second when executed in the Developer Console. There are more than 50,000 records that the query is searching through. Why such a dramatic difference in the query run time?

 

String s = '123456';
List<Registration__c> regs = 
    [select id, name 
     from Registration__c 
     where name =: s or speical_number__c =: s limit 1];

 

Here are the excerpts from the debug logs:

 

Developer Console:

12:22:39.063 (63557000)|SOQL_EXECUTE_BEGIN|[2]|Aggregations:0|select id, name from Registration__c where (name = :tmpVar1 or speical_number__c = :tmpVar2) limit 1

12:22:39.263 (263582000)|SOQL_EXECUTE_END|[2]|Rows:0

 

VF Page Controller:

12:17:08.148 (3148592000)|SOQL_EXECUTE_BEGIN|[633]|Aggregations:0|select id, name from Registration__c where (name = :tmpVar1 or speical_number__c = :tmpVar2) limit 1

12:18:07.350 (62350264000)|SOQL_EXECUTE_END|[633]|Rows:0

We have 500 users, and only one has been reporting this issue lately - whenever she clicks EDIT on an opportunity, and the edit page loads, some of the dependent picklists are missing their values.  So when she subsequently clicks SAVE, that triggers a bunch of validation rules.   This has been the case for her using Firefox and IE 8.

 

This has been going on for about a week or so.

When you add/edit a User on a User's Default Opportunity Team, a SF-native page comes up  - usersalesteamedit.jsp.   That page has a checkbox with the following label: "Automatically add my default opportunity team to opportunities that I create or open opportunities that are transferred to me". 

 

How do I access this checkbox programmatically?  Which object is it on?

Just noticed this yesterday, possibly result of the SF Winter 13 update.  

 

1) When changing the Opportnity owner via Apex, the original Sales Team is not deleted.

2) When changing Opportunity Owner via UI, the original Sales Team is deleted, but the new one is not always added.  This behavior is not consistent from owner to owner (User record)

Whenever a lead is reassigned, there is an option to notify the new owner by email.    The email they receive is pretty simple.   How can I change/customize its text?

 

Here is what users currently receive:

 

Subject: Lead: John Wayne has been assigned to you.

 

Lead: John Wayne, Wild West, Inc. has been assigned to you.

To view the details of this lead in salesforce.com click on the following link:
https://na1.salesforce.com/123dfgdf34234

We have about 10 custom home page components. I need to show one of them on pages for a custom object called "Registration".

 

There is a setting in the Setup/App Setup/Customize/User Interface, to "Show Custom Sidebar Components on All Pages". The problem is that it will show all 10 custom components on all pages, while I only need one displayed. Any ideas how to do that?

 

As a side note, this custom component consists of JavaScript that injects a custom lookup window link into the standard page layout.

I want to pass a SOQL query to a page, or have the user enter it on the page itself, process it, and then display results in a table.

 

Biggest problem is displaying the results, as VF dynamic binding only seems to be working one level deep, after that it gives null pointer exceptions (some bug in SF).

 

I have a dynamic main object with multiple related lists coming from the query, for example: user may be pulling a list of Accounts, with all related Contacts, and all related Opportunities.  Here is an example query:

 

select id, name, BillingState, (select id, name, title from Contacts), (select id, amount from Opportunities) from Account where name like '%Corp%'

 

Another time, the query might be on a completely different parent object, like:

 

select id, name, accountId, (select id, Cost from OpportunityLineItems), (select id, name from Attachments) from Opportunitiy limit 20

 

It's not a problem parsing the field and object names from the query, but using dynamic binding for displaying those results in a table on a VF page is a nightmare, and is not working.   Any ideas?  or maybe you have you seen VF code for this specific situation somewhere?

 

 

 

Hi,
I haven't been able to import Salesforce object data from Excel for a few days. My microsot license allows me to get data from Salesforce but when I enter my credentials through the oauth2 service in excel, I don't get a response and the url changes to https: // https: //c.salesforce.com/login- messages / promos.html

This issue started one day after we renewed Salesforce licenses. We have the Enterprise edition.

Has anyone had this problem or know how to fix it?

Before Login
Before login

After to try loginAfter login
 
Hi all,

We're thinking about activating Dev Hub in our production org, but I see that once it's been enabled, it can't be disabled. Is there any downside to enabling Dev Hub? Will we still have access to our old sandbox system? There's a lot of in-flight development in the current sandboxes and we don't want to change the way we work yet, we just want to explore Dev Hub and see it working in a practical environment.

Is there anything else we might need to bear in mind when activating Dev Hub? The documentation is a bit patchy on this subject.

Thanks!
My code development environment conists of Apple MBP, Google Chrome browser and Salesforces native Developer Console tool. With the Google Chrome v56 update, scrolling up/down in developer console becomes extremely jumpy and it makes my experience extremely painful. I have to go on Safari and develop there as a workaround.

Is anyone else here experiencing this issue? Here's the related StackExchange topic. I would like to hear any solutions to this problem if there's any.
I'm getting " TLS 1.0 has been disabled in this organization. Please use TLS 1.1 or higher when connecting to Salesforce using https." error when I refresh my eclipse. I performed below actions to fix the issue, but I'm not able to fix the error. 

1) Checked the critical updates - There is no update related to TLS 1.0 in my sandbox
2) I have Java 1.7 Version and enabled TLS 1.1 and 1.2. 
3) Enabled TLS 1.1 , 1.2 in all the browsers.
4) Added "-Dhttps.protocols=TLSv1.1,TLSv1.2"

Please let me know, is anything am missing here to fix this issue? 

User-added image
Hi,

I have verified an email in organization wide email address and sending email from apex class. This is working fine. But for one user it is throwing following exception,


System.EmailException: SendEmail failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, Not profiled to access this Org-wide Email Address: []

 
Hi,

Is there a way to access the trusted IP ranges through Apex and SOQL? I'm creating a visualforce application that checks if the user has specific Ip ranges set.

Thanks,
Andrew

I have two organizations, one for development and another for production/sandbox.

When I generate a WSDL from production/sandbox I have some lookup relationships mapped as Name.
If I generate the WSDL from the development environment instead, I get the same relationships mapped as SObject.

Here is an example for Lead:

Development:
<complexType name="Lead">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="AcceptedEventRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="ActivityHistories" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Address" nillable="true" minOccurs="0" type="tns:address"/>
...
<element name="Owner" nillable="true" minOccurs="0" type="ens:sObject"/>
<element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
...
</sequence>
</extension>
</complexContent>
</complexType>

Production:
<complexType name="Lead">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="AcceptedEventRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="ActivityHistories" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Address" nillable="true" minOccurs="0" type="tns:address"/>
...
<element name="Owner" nillable="true" minOccurs="0" type="ens:Name"/>
<element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
...
</sequence>
</extension>
</complexContent>
</complexType>


You can see that the Owner is mapped as Name in production but sObject in development.
That happens thoughout the whole wsdl. There is no Name object in development.

Both are using the same API version:

<soap:address location="https://login.salesforce.com/services/Soap/c/33.0/0DFi0000000CjGX"/>

<soap:address location="https://login.salesforce.com/services/Soap/c/33.0/0DFE0000000TYR9"/>

Is there a way to make both organizations map this multi-type lookup relationships to Name?
 

For a normal Email Task (workflow rule), you can specify that the sender is an org-wide email address.

We need to be able to set this for the Approval Request Notification template on an Approval Process.

 

How do I accomplish this?  It is critical to our business that the submitters of the request DO NOT have their name and email on the notification.

I have a section on a VF page that has a tab order set using two attributes: a) taborderhint on the inputFields and b) tabindex on a commandButton - with the desired effect of tabbing through the form fields and tabbing lastly to the button. 

I have set taborderhint="49" on the last field and tabindex="50" on the commandButton - so the last field should tab next to the button.  However the error I'm having is that instead of tabbing next to the button, it tabs to the page-header where the salesforce logo is and in the header, a link appears that reads "skip to main content".  Is there a solution to this so that I can tab from the last field to the button?  Also, is this appearance of text in the header that reads "skip to main content" - is that a bug? It certainly creates a confusing user experience.  FYI the button and the fields are within the same form component/tag.  Thanks in advance!

CODE:

<apex:outputPanel id="evtEntry">
            <apex:pageBlock title="New Event Entry" rendered="{!if(evtSelCB==true,true,false)}" tabStyle="Event">
                <apex:pageBlockSection columns="2">
                    <apex:inputField taborderhint="38" value="{!evtObject.Subject}"/>                   
                    <apex:inputField taborderhint="44" value="{!evtObject.WhoId}"/>
                    <apex:inputField taborderhint="39" value="{!evtObject.ActivityDateTime}"/>
                    <apex:inputField taborderhint="45" value="{!evtObject.WhatId}"/>
                    <apex:inputField taborderhint="40" value="{!evtObject.DurationInMinutes}"/>
                    <apex:inputField taborderhint="46" value="{!evtObject.Cost__c}"/>
                    <apex:inputField taborderhint="41" value="{!evtObject.OwnerId}"/>
                    <apex:inputField taborderhint="47" value="{!evtObject.Location}"/>
                    <apex:inputField taborderhint="42" value="{!evtObject.Event_Status__c}"/>
                    <apex:inputField taborderhint="48" value="{!evtObject.No_of_Attendees__c}"/>
                    <apex:inputField taborderhint="43" value="{!evtObject.isAllDayEvent}"/>
                    <apex:inputField taborderhint="49" value="{!evtObject.Description}" style="width: 360px; height: 50px"/>
                </apex:pageBlockSection>
            </apex:pageBlock>
        </apex:outputPanel>
       
        <!-- Bottom Save button -->
        <center>
            <apex:outputPanel id="outBottom">
                <apex:actionStatus id="myObjStatusBottom">
                    <apex:facet name="start">
                        <apex:image id="statusIconBottom" value="/servlet/servlet.ImageServer?oid=00D3000000007Jn&id=01550000000dc1c" width="30" height="30"/>
                    </apex:facet>
                    <apex:facet name="stop">
                        <apex:commandButton tabindex="50" action="{!createSelObjs}" value="Save Task/Opp/Event and Close" status="myObjStatusBottom" title="Click to save the selected records."/>                                                                  
                    </apex:facet>
                </apex:actionStatus>
            </apex:outputPanel>
        </center>

For some reason I cannot query any fields other than ID via API for a few recently created custom objects.   I am using Entersprise WSDL, and a simple  query of "select id, name from my_custom_object__c".

 

The result is this error:  org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - Name

 

 

If I try to pull only the ID, then there are no issues.  

 

I have checked the permissions for this new object, and there seems to be no problems there - visible to all.

 

 

Hi,

 

I am trying to find how to locate the 15-digit Salesforce ID of a given custom object. I need this to dynamically create a record type selection link:

 

/setup/ui/recordtypeselect.jsp?ent= <Salesforce_ID_Of_Custom_Object>

 

For standard objects its fine to simply enter the object name in the 'ent' parameter, but for custom objects it requires the Salesforce ID (which is the one you find if you look at the URL when editing that particular object. I understand getKeyPrefix() within the DescribeResult gives you the first three digits but there does not seem to be a way of getting the entire 15-digit ID. 

 

Hope someone can help me out. 

There is an "idea" to disable jobs, but is there a way to mass delete them all using Apex?   Would like to delete the following:

 

Dashboard Refresh

Data Export

Scheduled Apex

Report Run

 

 

 

https://sites.secure.force.com/success/ideaView?id=08730000000HBnU

Hi,

 

I have created a email template and added site's custom web address as {!Site.TopLevelDomain}.

 

This email template is used to send email alert through a workflow.

 

This workflow will get fired as a result of some custom action(field update) through website.

 

I am receiving the email but without the custom web address of the website.

 

I have tried with some other fields like {!Site.UrlPathPrefix}, {!Site.Subdomain}

but it doesn't display any thing within email template as a result of these fields.

 

For the time being i have hard coded this url within the email template. But I want to remove this hard coded url.

 

Is there any thing else which need to be provided?

If any one have any idea please tell me.

 

 

Hi everyone,

 

I'd like to use wildcards for Remote Site settings.

For example, it's https://*.test.com.

Please let me know if you have any solutions.

 

Thanks,

Seiji

In my current development org, I add a custom link on an object which is defined in a managed package. Now I am trying to persist the metadata and then migrate this custom link to another org. According to Force.com Migration Tool Guide, <Type> element with value 'Weblink' should be manually specified in package.xml. It also says, 'this type is retrieved or deployed as part of a custom object file. You must dot-qualify the object name before the component name.'. I put it like the following code in package.xml but it is not grabbing any custom link metadata in the custom object as is expected. Any comments would be highly appreciated.

 

<types>
    <members>[packagePrefix.customObject__c].[customLinkName]</members>
    <name>Weblink</name>
</types>

 

 

  • December 14, 2010
  • Like
  • 0

We're getting an unexpected error message when we try to compile this on the line noted below: "Error: Compile Error: Expression of type TestClass.TestType has no member named A at line ....."

 

If we comment out the contents of runTest then it compiles fine. We suspect a bug in Apex in which static methods cannot reference enums. This is ironic because static testMethods can!


@isTest
private class FixAccountIdInSalsTest
{
    private enum TestType{A, B}
    
    private static testMethod void testForA()
    {
        runTest(TestType.A); // COMPILES FINE
    }

    private static testMethod void testForB()
    {
        runTest(TestType.B); // COMPILES FINE
    }
    
    private static void runTest(TestType testType)
    {
        Test.StartTest();
        if (TestType.A == testType) // COMPILER BREAKS HERE
        {
            // do something
        }
        else if (TestType.B == testType) // AND PRESUMABLY BREAKS HERE
        {
            // do something else
        }
    }
}

Hi all,

We're thinking about activating Dev Hub in our production org, but I see that once it's been enabled, it can't be disabled. Is there any downside to enabling Dev Hub? Will we still have access to our old sandbox system? There's a lot of in-flight development in the current sandboxes and we don't want to change the way we work yet, we just want to explore Dev Hub and see it working in a practical environment.

Is there anything else we might need to bear in mind when activating Dev Hub? The documentation is a bit patchy on this subject.

Thanks!
Hi,

I have verified an email in organization wide email address and sending email from apex class. This is working fine. But for one user it is throwing following exception,


System.EmailException: SendEmail failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, Not profiled to access this Org-wide Email Address: []

 

I have two organizations, one for development and another for production/sandbox.

When I generate a WSDL from production/sandbox I have some lookup relationships mapped as Name.
If I generate the WSDL from the development environment instead, I get the same relationships mapped as SObject.

Here is an example for Lead:

Development:
<complexType name="Lead">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="AcceptedEventRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="ActivityHistories" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Address" nillable="true" minOccurs="0" type="tns:address"/>
...
<element name="Owner" nillable="true" minOccurs="0" type="ens:sObject"/>
<element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
...
</sequence>
</extension>
</complexContent>
</complexType>

Production:
<complexType name="Lead">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="AcceptedEventRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="ActivityHistories" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Address" nillable="true" minOccurs="0" type="tns:address"/>
...
<element name="Owner" nillable="true" minOccurs="0" type="ens:Name"/>
<element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
...
</sequence>
</extension>
</complexContent>
</complexType>


You can see that the Owner is mapped as Name in production but sObject in development.
That happens thoughout the whole wsdl. There is no Name object in development.

Both are using the same API version:

<soap:address location="https://login.salesforce.com/services/Soap/c/33.0/0DFi0000000CjGX"/>

<soap:address location="https://login.salesforce.com/services/Soap/c/33.0/0DFE0000000TYR9"/>

Is there a way to make both organizations map this multi-type lookup relationships to Name?
 

Is there an object for SetupAuditTrail that could be accessed via API?? or is the manual download through Your Name > Setup > Security Controls > View Setup Audit Trail the only option ??

 

Any help would be appreciated. 

Hello,

 

I have been looking for a way to access the setup audit trail programatically, using apex or webservice api. But without any luck. 

Is there a way to achieve this.. 

 

Maybe by using some URL Tricks ?

 

The basic requirement is to get a list of all the actions performed by a user in a given time (as displayed in the setup audit trail). It would be great if I could simply query that from some Table ?

 

Any Ideas , Leads, Comments please.

 

 

  • September 14, 2011
  • Like
  • 1