• nathanael.m
  • NEWBIE
  • 5 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 19
    Replies
Performing the following query via soap throws an unknown exception:

SELECT Id, ActionScript, ActionScriptType, Line, ExpirationDate, HeapDump, ApexResult FROM ApexExecutionOverlayResult

The error message: 

An unexpected error occurred. Please include this ErrorId if you contact support: 1308411011-5945 (1693774395)

I wasn't getting this error last week.

Thanks,

Nathanael

If I want to use an image uploaded to Salesforce Content on a Force.com portal, is it possible to have the servlet not set the headers that cause the file to be downloaded as opposed to opened in the browser? This would be beneficial within Salesforce itself as well. All you get now is a thumbnail and you have to download the full version. I just want to click it and see the full version.

 

The servlet below is not terribly useful if you want to use it in an <img> tag. Also applies to videos.

 

http://TheSiteURLGoesHere/sfc/servlet.shepherd/version/download/ContentVersionIDGoesHere

 

Thanks,


Nathanael

Hi,

 

If Communities is replacing customer portal and partner portal for new organizations, how do you enable login for Force.com Sites? Previously you would select the portal to use.

 

Thanks,

 

Nathanael

Since the Summer '11 upgrade the meta data api is always returning CodeCoverageResult's that have locationsNotCovered set to zero regardless of how much test coverage exists.

 

Anyone else experiencing this?

The Limits.getScriptStatements() method is always returning 0 within a batch process.

I'm assuming this isn't by design?

 

Thanks

I'm getting the following error when updating a list custom setting that's part of a managed package:

 

Update failed. First exception on row 0 with id a0DA0000007MfC9MAK; first error: FIELD_INTEGRITY_EXCEPTION, There is already an item in this list with the name

 

I've only recently started seeing this and simply cannot see how this is possible. The code is very simple, retrieve the custom setting, change a field, and then update (not insert). Nowhere am I touching the id or name of the returned object. Example:

 

MySetting__c mysetting = MySetting__c.getValues('TestName');

mysetting.MyField__c = 'test';

update mysetting;

 

Any insights as to why this would happen?

I've discovered some strange behaviour with the Url Rewriter. I've implemented the Site.UrlRewriter class, the class created doesn't actually do any rewriting, it passes the page references through untouched. I then created a very basic VisualForce Page that has some text and an apex:include in it and nothing else. I include the FileNotFound page. When I visit my page all I get back is the Doctype.  Interestingly enough, the debug log indicates that everthing executes and completes, I just get a blank page. If I take the apex:include out everything is fine and the Url Rewriter works flawlessly.

 

Anyone else run into this?

 

Nathanael

My developer org was upgraded to Summer '10. I'm unable to implement a Site.UrlRewriter as per the developer docs. Returns the error: Invalid class: urlrewriter.

 

Any ideas?

Regardless of what I set the logType to I still get the full debug log after executing a deploy and runAllTests. As per the documentation I set it to 'None', then 'Debugonly', then 'Detail' and I always get the same log back. It's also being truncated and ending with ********* MAXIMUM DEBUG LOG SIZE REACHED **********.

 

When I try to view the build details in CruiseControl it takes about 15 minutes for the page to load because the log is so big. Is there no way to filter out most of the debug info? I just need to know what tests failed...

 

Thanks,

 

Nathanael

There are differences in how the redirect is being handled across instances.

On na7 the behaviour is incorrect and the redirect page returned is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

<script>
if (window.parent.location.replace){
window.parent.location.replace('https://cms.na7.visual.force.com/apex/editpagelayout?id=a08A0000000JF87IAG&sname=SampleSite');
} else {;
window.parent.location.href ='https://cms.na7.visual.force.com/apex/editpagelayout?id=a08A0000000JF87IAG&sname=SampleSite';
}
</script>

</head>
</html>

You'll notice that it sets the window.parent.location in order to redirect. This should not be the case. For example if the page being redirected is in an iframe you lose the parent's context.

On na6 the behaviour is as it should be and so is the page that performs the redirect:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

<script>
if (window.parent.location.replace){
window.location.replace('https://cms.na7.visual.force.com/apex/editpagelayout?id=a08A0000000JF87IAG&sname=SampleSite');
} else {;
window.location.href ='https://cms.na7.visual.force.com/apex/editpagelayout?id=a08A0000000JF87IAG&sname=SampleSite';
}
</script>

</head>
</html>
This difference results in our application working as intended on na6 but not on na7. I thought Salesforce used a single code base for all the instances? 

We've created a Salesforce Site, a public facing ideas section using the customer portal, and we've also purchased some Ideas Only Portal Licenses. Some of the site pages access some custom objects via the Sites guest user account. When an Ideas Only Portal Licensed user logs into the customer portal and then visits the site, those pages no longer work as designed since Ideas Only users have no visiblity to those objects.

 

Is there a way for the Ideas Only portal users to access the Site with guest permissions even if they're logged into the portal? Limiting the Ideas Only users in this way doesn't make sense, since we've effectively given public read access to the objects referenced by the Site.

 

Thanks,

 

Nathanael

 

 

I have an abstract class that I'm trying to make a minor change to one of it's methods. I can't even add addition comments without the following error showing up.

 

Error: Compile Error: Global/WebService identifiers cannot be removed from managed application: .......

 

Nothing in the class is global and yet I keep getting that error.

 

The managed package is released.

Given a contract I can get a list of attached Notes and Attachments using the following queries:

[SELECT Id, Name FROM Attachment WHERE ParentId=:contract.Id]
[SELECT Id, Title FROM Note WHERE ParentId=:contract.Id]

I combed through the schema and api documentation and I've been unable to find a way to retrieve a list of attached Google Docs.

Any Idea's?

Test coverage in my package is failing! It seems to be failing on blank lines, closing brackets, random lines in queries and comments. Causing my code coverage to be half (or less) than what it should be!

 

None of this should be scanned.

 

Anyone else getting this problem?

The Limits.getScriptStatements() method is always returning 0 within a batch process.

I'm assuming this isn't by design?

 

Thanks

I'm getting the following error when updating a list custom setting that's part of a managed package:

 

Update failed. First exception on row 0 with id a0DA0000007MfC9MAK; first error: FIELD_INTEGRITY_EXCEPTION, There is already an item in this list with the name

 

I've only recently started seeing this and simply cannot see how this is possible. The code is very simple, retrieve the custom setting, change a field, and then update (not insert). Nowhere am I touching the id or name of the returned object. Example:

 

MySetting__c mysetting = MySetting__c.getValues('TestName');

mysetting.MyField__c = 'test';

update mysetting;

 

Any insights as to why this would happen?

Hi,

 

I am getting the following error and am struggling to find a fix.

 

"This page has changed since you started your edit. Refresh your page and try again."

 

The code has been running fine on developer accounts on na6 and na7 but is now failing on cs2!  Turning on logging doesnt pick up anything.  I don't understand why it works fine on one instance but not the other... dont think there is anything in the config that is much different.  Refreshing does not help.

 

I think the error may happen during a redirect but I will have to go through the code  - just wondering if anyone has seen this one before?

 

Any thoughts?

 

Thanks

Graham

I've discovered some strange behaviour with the Url Rewriter. I've implemented the Site.UrlRewriter class, the class created doesn't actually do any rewriting, it passes the page references through untouched. I then created a very basic VisualForce Page that has some text and an apex:include in it and nothing else. I include the FileNotFound page. When I visit my page all I get back is the Doctype.  Interestingly enough, the debug log indicates that everthing executes and completes, I just get a blank page. If I take the apex:include out everything is fine and the Url Rewriter works flawlessly.

 

Anyone else run into this?

 

Nathanael

My developer org was upgraded to Summer '10. I'm unable to implement a Site.UrlRewriter as per the developer docs. Returns the error: Invalid class: urlrewriter.

 

Any ideas?

Note I'm not positive the subject of this post is the true reason for the bug.  The other possible explanation is:


Dynamic SOQL requires namespace prefixes when called in global context

 

Anyway, the bug is:

 

Our managed package occasionally uses Dynamic SOQL.  In one case, we have a controller that uses Database.query() without any namespace prefixes:

Database.query('select CustomField__c from CustomObject__c');

 

In another case, we call Database.getQueryLocator() (as part of a Database.Batchable implementation).  That query also does not include the namespace prefix:

global Database.queryLocator start(Database.BatchableContext bc) {
return Database.getQueryLocator('select CustomField__c from CustomObject__c');
}

 

 


All of this works in our DE org, but once packaged & deployed, only the first one works.

 

The second ("getQueryLocator") throws an exception:

Developer script exception from iHance : 'i.Maintenance' : common.exception.ApiQueryException: No such column 'CustomField__c' on entity 'i__CustomObject__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.


I'm not sure if the bug is that getQueryLocator() requires the namespace prefix, or if Dynamic SOQL methods called in the global context do.  Without re-packaging everything to create a test case, there's no way for me to tell.

 

Salesforce support - I've created case 03501471 to track this issue.

  • April 23, 2010
  • Like
  • 0

Hi everyone,

 

I am in a visualforce page with a Controller. I have a list and a command button in this page.

 

<apex:selectList id="country" value="{!cdt.Country__c}" size="1"> <apex:selectOptions value="{!Values}"></apex:selectOptions> </apex:selectList><apex:commandButton action="{!test}" value="{!$Label.btn_Save}" />

 

When I call the commandButton, the list method getValues is called BEFORE the test method.

Several questions then:

- why is it called at all? It is part of the initialization of the page and shouldn't be called when we call an action! My intuition is that it is part of the validation that is automatically called by Salesforce when we call an action. But I don't see any reason why

-  It seems that it fires the Heap size verification. And the only solution we found to control the heap size of a page (for example when you want to upload big files) is to put null in the variable holding the big data when you don't need them, which is at the end of the action method. But if this verification is fired BEFORE this action then this solution doesn't work anymore.

 

Any thoughts?

 

Laurent 

 

We've created a Salesforce Site, a public facing ideas section using the customer portal, and we've also purchased some Ideas Only Portal Licenses. Some of the site pages access some custom objects via the Sites guest user account. When an Ideas Only Portal Licensed user logs into the customer portal and then visits the site, those pages no longer work as designed since Ideas Only users have no visiblity to those objects.

 

Is there a way for the Ideas Only portal users to access the Site with guest permissions even if they're logged into the portal? Limiting the Ideas Only users in this way doesn't make sense, since we've effectively given public read access to the objects referenced by the Site.

 

Thanks,

 

Nathanael

 

 

Hi,

 

   I'm having a weird problem that I can't figure out in my developper organization. We have old "picklist" values that keeps reappearing in the ObjectTranslations folder. I have made sure that:

 

   1) The old picklist value really is not defined on the field in the Object

   2) That there are no old records using the old picklist value (using SForce Explorer and also from the Recycle Bin)

 

   The value keeps reappearing whenever we retrieve the files using ANT. I even tried manually editing the translation file to remove the value, but it always comes back.

 

  Any ideas?

 

 Thanks

 

 

Message Edited by FBang on 11-20-2009 08:31 AM
  • November 20, 2009
  • Like
  • 0

Hi,

 

I have developed different component and I want to add it in visual force pages at runtime. Same like one can add component in Google and myyahoo page.

 

I don't find any way of doing this. Please help!

 

 

I have an abstract class that I'm trying to make a minor change to one of it's methods. I can't even add addition comments without the following error showing up.

 

Error: Compile Error: Global/WebService identifiers cannot be removed from managed application: .......

 

Nothing in the class is global and yet I keep getting that error.

 

The managed package is released.

I have these number of records in the database for the following queries:

 

Total Parent__c records = 2800

Total Child__c records  = 77,800

 

On an average, each parent has around 30 childs.

 

When I run the following piece of code, I get a governor limit error (query row). Note that I get retrieving only 10 parent records! I still get this error. I  debug log says that only 177 records out of allowed 10,000 were retrieved.  Seems like there is some issue with Childs__r.size() statement. 

 

 

 

for (Parent__c p: [select Name,
(select Name from Childs__r)
from Parent__c limit 20] {
i++;
System.debug('i is ' + i);
System.debug('Name is ' +p.Name);
Double count =p.Childs__r.size();
System.debug('Child Count is ' + count);


}

 

System Log says:

 

 

12:44:31 ERROR - Evaluation error: System.QueryException: Aggregate query has too many rows for direct assignment, use FOR loop

 

Resource usage for namespace: (default)

Number of SOQL queries: 1 out of 100

Number of query rows: 177 out of 10000

Number of SOSL queries: 0 out of 20

Number of DML statements: 0 out of 100

Number of DML rows: 0 out of 10000

Number of script statements: 51 out of 200000 

 

 

When I write a differenr query where I get 1100 Parents, the query ran for 6 minutes and and I loop through every child of it,  I am able to go through 29678 records (i=29678).  The debug log says that that number of query rows is 1267...records...what's going on? 

 

 

for (Parent__c p: [select Name,
(select Name from Childs__r)
from Parent__c limit 1100] {

for (Child__c c:p.Childs__r) {

i++;
System.Debug(‘Child Name is ‘ + c.Name);
}

}

System.debug('i is ' + i);

 

 Debug Log:

 

Resource usage for namespace: (default)

Number of SOQL queries: 1 out of 100

Number of query rows: 1267 out of 10000

Number of SOSL queries: 0 out of 20

Number of DML statements: 0 out of 100

Number of DML rows: 0 out of 10000

Number of script statements: 59362 out of 200000

Maximum heap size: 938 out of 1000000 

 

 

 

 

Message Edited by GoForceGo on 03-02-2009 12:47 PM
Message Edited by GoForceGo on 03-02-2009 12:47 PM
Message Edited by GoForceGo on 03-02-2009 12:48 PM