• Tom H.
  • NEWBIE
  • 30 Points
  • Member since 2010

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

We were excited to read about this new class and method in the Summer 11 releas.  However, it doesn't look like this method behaves as it should. 

 

Documentation states:


Returns the URL of the Salesforce instance.
For example, https://na1.salesforce.com.

 

If I execute the following line from the system log....


String baseUrl = System.URL.getSalesforceBaseUrl().toExternalForm();

System.debug('baseUrl =' + baseUrl);

 

This produces this output...

baseUrl = https://na8.salesforce.com/apexdebug/SystemLog.apexp

 

which is incorrect because it includes 'apexdebug/SystemLog.apexp'.

 

Even worse, if I run the same code from a controller tied to a visual force page, I get...

 

baseUrl=https://c.na8.visual.force.com/services/Soap/class/CreditPersonsWS

Is this a bug or am I misunderstanding what the purpose of this method is?

 

Thanks 

I am looking for a document that explains how to analyze and tune SOQL queries. Does anyone know of a good doc that explains the best approach and describes tools that can help with the analysis?  Also, are there any tools like some that you get with major RDBMS products that can tell me details about query paths, physical disk io, logical disk io,....  Finally, I am looking for information on tactics to help improve performance of a query.  Any help would be appreciated.

 

Thanks

  • February 25, 2011
  • Like
  • 0

Are there profile settings that can make the "Organization" object available to non-admin users?

 

My application runs fine for admins but blows-up for non-admin users in the following method:

 

    public static id getOrgId() {
        return [Select o.Id From Organization o limit 1].get(0).id;
    }

 

The error shown on the page is:

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

 

Please advise.

Tom

  • February 24, 2011
  • Like
  • 0

Hi All,

 

I  m getting the "INVALID_SESION_ID: Invalid Session ID found in SessionHeader: Illegal Session" error for all my callout and the flex pages where i m passing session id through  UserInfo.getSessionId() from apex after winter 11 rollover 

 

Dose any one experiencing the same..???

 

Does salesforce doing any fix for this..??

 

Thanks,

Amar

 

We were excited to read about this new class and method in the Summer 11 releas.  However, it doesn't look like this method behaves as it should. 

 

Documentation states:


Returns the URL of the Salesforce instance.
For example, https://na1.salesforce.com.

 

If I execute the following line from the system log....


String baseUrl = System.URL.getSalesforceBaseUrl().toExternalForm();

System.debug('baseUrl =' + baseUrl);

 

This produces this output...

baseUrl = https://na8.salesforce.com/apexdebug/SystemLog.apexp

 

which is incorrect because it includes 'apexdebug/SystemLog.apexp'.

 

Even worse, if I run the same code from a controller tied to a visual force page, I get...

 

baseUrl=https://c.na8.visual.force.com/services/Soap/class/CreditPersonsWS

Is this a bug or am I misunderstanding what the purpose of this method is?

 

Thanks 

I am looking for a document that explains how to analyze and tune SOQL queries. Does anyone know of a good doc that explains the best approach and describes tools that can help with the analysis?  Also, are there any tools like some that you get with major RDBMS products that can tell me details about query paths, physical disk io, logical disk io,....  Finally, I am looking for information on tactics to help improve performance of a query.  Any help would be appreciated.

 

Thanks

  • February 25, 2011
  • Like
  • 0

Are there profile settings that can make the "Organization" object available to non-admin users?

 

My application runs fine for admins but blows-up for non-admin users in the following method:

 

    public static id getOrgId() {
        return [Select o.Id From Organization o limit 1].get(0).id;
    }

 

The error shown on the page is:

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

 

Please advise.

Tom

  • February 24, 2011
  • Like
  • 0

Hello Friends,

 

My requirement is that, i need to generate an XML out of my VF page. For this, i specified the "ContentType="application/xml" on my page header and then included the DOCTYPE tags to generate a standard XML out of it.

 

But somehow, i am not able to get the XML styling in the generated page and it shows me the shole page elements intead of just showing me the data.

 

Can you please let me know where i am going wrong or is this possible in VF? Pasting my VF page code below:

 

 

<apex:page cache="true" Controller="TestController" contentType="application/xml" showHeader="false">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/html" xml:lang="en" lang="en">
<body>
<apex:form >
<apex:pageblock id="exportDocs">
<apex:pageBlockTable value="{!exportValues}" var="actual">
<apex:column headerValue="Id" value="{!actual.Id}"/>
<apex:column headerValue="Act Name" value="{!actual.Name}"/>
<apex:column headerValue="MType" value="{!actual.A_Type__c}"/>
<apex:column headerValue="Country" value="{!actual.Country__c}"/>
<apex:column headerValue="B" value="{!actual.B__c}"/>
<apex:column headerValue="Actual C" value="{!actual.C__c}"/>
<apex:column headerValue="Actual G" value="{!actual.G__c}"/>
<apex:column headerValue="Actual I" value="{!actual.I__c}"/>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</body>
</html>
</apex:page>

 

Any help/guidance would be highly appreciated!!

 

Many Thanks,

Cool_D
Does anyone have any experience using the encrypted fields feature?  I have added an encrypted custom field to the USER object where I store a password.  I want to use this field in some javascript in a custom button.  Like this...
 
if (xmlhttp)
{xmlhttp.open('GET', 'https://somepage.com/api/login.aspx?email={!User.Remail__c}&pwd={!User.RPassword__c}', false);
xmlhttp.send();
I'm guessing it's still encrypted when it sends the request because it doesn't work.  Is this even possible?  I appreciate the help!!
  • January 23, 2008
  • Like
  • 0