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

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 6
    Likes Given
  • 35
    Questions
  • 120
    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
 
how we can add visual force pages in lightning dashboard?
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?
 

Hello Friends,

Please help me it's Urgent ....

Thanks for your help in advance..
  • May 13, 2015
  • Like
  • 0

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.

does anyone know how to get the count of workflow rules in an organization.

 

thanks in advance.

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 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

Hi

 

can't seem to find an answer to this one anywhere !

 

Can i use select to SOQL picklist values ? If as I suspect the answer is 'no' what is the standard way to do this.

 

ta in advance

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. 

I was looking for a way to parameterize the value for a filter criteria field on a number of reports.  That way I would not have to edit a large number of reports whenever the filter value changes once a year.  I used a Salesforce Custom Label and passed it in the report URL using  '?pv0={!$Label.Financial_year}.  Now whenever that value needs to be updated, I change the value in the Custom Label and don't touch the reports.

  • April 16, 2012
  • Like
  • 1

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