• Yagna_Dev
  • NEWBIE
  • 25 Points
  • Member since 2009

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

Hi everyone,

 

I am trying to fix my s-control. Currently I ran into two issues. I have the following code:

 

var icon = sforce.connection.query("Select d.id from Document d where Name='SCMgr Icon'").records.Id;
var tab = sforce.connection.query("Select w.id from WebLink w where Name='SalesAdvisor'").records.Id;
var trans = sforce.connection.query("Select d.id from Document d where Name='onepixel'").records.Id;

 

it works perfectly when I logged in as System strator profile.

 

however, when I logged in as Standard User profile, it doesn't.

more interestingly, I get value for icon, but I get undefined for tab and trans.

I can go to the document section and open SCMgr Icon and onepixel just fine.

 

If anyone can help, I will be very much appreciated. Thanks.

  • April 21, 2010
  • Like
  • 0

Hi everyone,

 

I am trying to fix my s-control. Currently I ran into two issues. I have the following code:

 

var icon = sforce.connection.query("Select d.id from Document d where Name='SCMgr Icon'").records.Id;
var tab = sforce.connection.query("Select w.id from WebLink w where Name='SalesAdvisor'").records.Id;
var trans = sforce.connection.query("Select d.id from Document d where Name='onepixel'").records.Id;

 

it works perfectly when I logged in as System strator profile.

 

however, when I logged in as Standard User profile, it doesn't.

more interestingly, I get value for icon, but I get undefined for tab and trans.

I can go to the document section and open SCMgr Icon and onepixel just fine.

 

If anyone can help, I will be very much appreciated. Thanks.

  • April 21, 2010
  • Like
  • 0

Very simple to reproduce. Create a page with this code and submit the button.

<apex:page showHeader="false" standardStylesheets="false" id="page">

<apex:form id="form" >
<apex:actionStatus id="submit">
<apex:facet name="stop">
<apex:commandButton value="Submit Registration" status="submit" rerender="form"/>
</apex:facet>
<apex:facet name="start">
<apex:outputPanel >Processing...</apex:outputPanel>
</apex:facet>
</apex:actionStatus>
</apex:form>

</apex:page>

 

You will get this javascript error:

 

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)
Timestamp: Fri, 12 Feb 2010 20:26:53 UTC


Message: Unknown runtime error
Line: 120
Char: 1
Code: 0
URI: https://cs1.salesforce.com/faces/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.AjaxScript

 

This happens in regular and compatibility mode. I have not yet been able to test IE6 and IE7.

 

There are no issues with Firefox, Chrome, Safari.

Message Edited by TehNrd on 02-12-2010 12:51 PM
Message Edited by TehNrd on 02-12-2010 01:54 PM
  • February 12, 2010
  • Like
  • 0