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

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 35
    Questions
  • 107
    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?

 

 

 

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: []

 
I am using the most current Force.com Toolkit for PHP provided at https://developer.salesforce.com/page/PHP_Toolkit to do this API push. I can authenticate and query salesforce without any issue, however when I attempt to create a lead, Salesforce responds back with an error "Unable to find a deserializer for the type common.api.soap.wsdl.QueryResult Error Id: 39234132-20621 (-848058548)"

Here is the SOAP data we are sending salesforce:
 
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:enterprise.soap.sforce.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns1:SessionHeader>
<ns1:sessionId>00D1a000000JetW!AQIAQJqI9ahtjmZI2urRBcTQaq6MX0iu.1y93JKc3j06U99YIi39oEJ8ryvfbLlESvOFpczPOf0wsmnSiQLYpD7SRSUajA5j</ns1:sessionId>
</ns1:SessionHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:create>
<ns1:sObjects xsi:type="ns1:Lead">
<Name>John Doe</Name>
<Email>johndoe@example.com</Email>
<City>BEVERLY HILLS</City>
<Reason__c>BECOME AN APPLICATOR         -</Reason__c>
<Phone>(555)555-1212</Phone>
<Sq_Footage__c>0</Sq_Footage__c>
<Industry>*APPLICATOR</Industry>
<Own_Equipment__c>FALSE</Own_Equipment__c>
<Type_of_Building__c></Type_of_Building__c>
<PostalCode>90210</PostalCode>
<State>CA</State>
<Referrer__c>GOOGLE AD</Referrer__c>
<Referring_Page__c>Google</Referring_Page__c>
<Project_Type__c></Project_Type__c>
<Company>John Doe, Inc.</Company>
<Completion_Deadline__c></Completion_Deadline__c>
<Current_Supplier__c>Home Depot</Current_Supplier__c>
<Notes>Testing API Testing Line 2</Notes>
</ns1:sObjects>
</ns1:create>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
And here is the SOAP response from Salesforce:
 
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Unable to find a deserializer for the type common.api.soap.wsdl.QueryResult Error Id: 39234132-20621 (-848058548)</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
 
Hello everyone,

Searched this topic for the better part of this day, but no solution came up.

Im encountring a strange message while trying to create a new contact.
$username = "Username"; /* edited out */
$password = "Password"; /* edited out */
$token = "token"; /* edited out */
$auth = $password . $token;
$connection = new \SforceEnterpriseClient();
$connection->createConnection(Manager::WSDL); /* the location of the wsdl file is correct */
$loginResponse = $connection->login($username, $auth); /* Login is successful */
Up until this point everything is going smooth. Now, Im trying to do a create contact request:
try {
        //Creating the Contact
        $contact = new \Contact();
        $contact->FirstName = "First";
        $contact->LastName = "Last";

        $response = $connection->create(array($contact), 'Contact');
        var_dump($response);
} catch (Exception $e) {
        echo $e->getMessage();
}

This is a simplified case which reproduces the problem over my system.
The problem is, an exception is thrown. The last "echo" prints out 
Unable to find a deserializer for the type common.api.soap.wsdl.QueryResult Error Id: 1664238328-34686 (2133394444)
Seems like its coming from the SoapClient itself. but i might be wrong.

Im using SoapClient native package of PHP5.3.
If any other data needed, please ask and i'll provide ASAP.

Would appreciate any suggestion or tips on this issue.

Thank you very much in advance
 

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.

Hello all, 
   Everytime we refresh a sanbbox, there are many little things that need to be done before we consider it "Ready" for development.  One of those things is to set the Email Deliverability settings to "All Email."  I have a wrote a script that automates all of the other little things and the last piece is to change the email deliverability settings.  I am not sure if that setting is available via the API and wanted to check to see if someone can either slap my hand for trying or point me in the right direction.

So just to recap, I want to set the  Email Deliverability Settings (http://help.salesforce.com/apex/HTViewHelpDoc?id=emailadmin_deliverability.htm) using Apex via an anonymous block in the dev console.  
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>

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.

 

 

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

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

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

When I get an email notice of an unhandled apex exception, sometimes it includes a full debug log dump, and sometimes it doesn't.  What determines whether it includes the log or not?

 

Last night I was struggling with a tricky bug, one I couldn't seem to recreate in my tests, and I was trying to get a log of some code launched from a VF page.  It was sending me exception emails, but the debug log was cut off after one line (total email size 2K).  Hours later, the exact same error resulted in an email with a full log (email size 190K).  I had the System Log window open the second time, hoping to get the log to show up there.  It didn't, but does that affect what you get in the email?  

 

I made a few other settings changes in between the two emails (turned off Development mode) and was using a different browser, but I wouldn't expect that to make a difference.

 

Thanks!
M.

  • September 09, 2009
  • Like
  • 0
Hi,

I have a formula field named Contract End Date and the value of this field should be calucated based on Contract Start Date and the Contract Duration. Contract Start Date is of type Date and Contract Duration is the number of months. Id I just add both the fields it considers Contract Duration as number of days instead of month. How do I achieve this?

Thanks
Jina
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: []

 

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