• BAGEL
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 54
    Questions
  • 59
    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 all,

 

I run into a problem with the following line when I am not log in as Administrator. Does anyone know why and how to resolve this? Thanks in advance.

 

var tab = sforce.connection.query("Select w.id from WebLink w where Name='Advisor'").records.Id;

 

William

  • April 19, 2010
  • Like
  • 0

Hi all,

 

I run into a problem with the following line when I am not log in as Administrator. Does anyone know why and how to resolve this? Thanks in advance.

 

var tab = sforce.connection.query("Select w.id from WebLink w where Name='Advisor'").records.Id;

 

William

  • April 05, 2010
  • Like
  • 0
Hi all,

I stored some images and script files in Documents. I need to access them from S-control. Salesforce developer support suggests me to do a query. Does anyone know how? Can anyone give me an example? Thank you in advance.

William

  • January 16, 2009
  • Like
  • 0
Hi there,

I upload some images & javascript files to Static Resource section. However when I try to access those resource in my S-Control by {!$Resource.resource_name}, it gives me a syntax error saying it does not exist. Do we allow to use Static Resource in our S-Control? If so, what did I do wrong? What is the correct way? Please help, and thanks in advance.
  • December 08, 2008
  • Like
  • 0
Hi everyone,

I have a question on how to access my attachment on Document section in my S-Control. Before, I was able to "copy and paste" the URL, and it worked fine. However, now it doesn't work anymore when I install my app to a different account. Salesforce support tells me that I need to create a query within the links to my internal items that call for the new ID then it will resolve to the new id for the document or object link.

However, what does that mean? How do I query my internal items? Can anyone give me an example or something? Thanks.


  • December 05, 2008
  • Like
  • 0
Hi,

I have an urgent problem that needs to figure out ASAP.

We have an app on appexchange. In our app, we use some internal link like so "https://na5.salesforce.com/servlet/servlet.FileDownload?file=01540000000KqY6" in our S-Control. As I understand, When an user install our app, AppExchange will will update these links with their environment setting. Everything is working fine since last week. But today, when a new user installed our app, the links don't update properly. Any ideas? does saleforce/appexchange change something? I need this resolves quickly. Please response. Thanks.

William
  • October 24, 2008
  • Like
  • 0
Hi,

I have an urgent problem that needs to figure out ASAP.

We have an app on appexchange. In our app, we use some internal link like so "https://na5.salesforce.com/servlet/servlet.FileDownload?file=01540000000KqY6" in our S-Control. As I understand, When an user install our app, AppExchange will will update these links with their environment setting. Everything is working fine since last week. But today, when a new user installed our app, the links don't update properly. Any ideas? does saleforce/appexchange change something? I need this resolves quickly. Please response. Thanks.

William

  • October 24, 2008
  • Like
  • 0
Hi there,

we have an app listing on AppExchange, back then when it was non-managed. Recently we update our app using mananged package. So my question is, what is the best way to update my existing listing with this new package? I see 2 options, 1. click on "Replace Package", and send a support request (I imagine it will take sometime), or 2. publish the new package as a new app, and delete the existing one. Which is the right way to do? Or is there a third option? Thanks.


  • November 23, 2007
  • Like
  • 0
Hi all,

I have setup a managed package in Developer Settings. I would like to know if it is possible to change any of the options after? Because I don't see there is any Edit button in that section. Thanks.

  • November 20, 2007
  • Like
  • 0
Hi All,

I was looking at the screencast for PTODemo (Time Off Manager App). I am very impressed with it. I am wondering if it is available for public use. One thing I am still wondering how to do, I noticed that after the demonstrator clicked on "Submit for Approval", the button (along with a few others) will no longer showing when next time the document opens. How to do that? Anyone?


  • April 04, 2007
  • Like
  • 0
Hi All,

I have a question. Is there a way to show/hide Custom Button based on a condition?
For example, I want my button only show when the Opportunity is Open. Is it possible?
Thanks.


  • April 03, 2007
  • Like
  • 0
Hi there,

I ran into a problem with Sforce.Dynabean. I have a function that create a custom object and save it. It works in Firefox, but it doesn't save in IE, but also doesn't give an error. Any ideas? (btw. it works fine in both browsers before I managed the package)


    var objCustom = new Sforce.Dynabean("CustomObj__c");   
    //... populate some fields...

    var saveResults = sforceClient.create([objCustom])[0];
    if(saveResults.success){
    }else{
        alert(saveResults);
    }


   
  • March 22, 2007
  • Like
  • 0
Hi everyone,

I am using 7.0 api and 3.3 ajax toolkit. I have 2 custom objects. Everything works just fine. Until I repackage my app with the new manage package feature. I understand that I will need to modified my code to add the new prefix to each instance of custom objects and custom fields.

I can successfully get the data from one of my object. However, the other object I have problem with. Even as simple as I retrieve the Id field of the object, I still get a script error in the sforceclient.js saying

db.getItem(key) has no properties
var v = db.getItem(key).value;

Anyone has any clues?

Thanks in advance.


  • March 07, 2007
  • Like
  • 0
Hi there,

I was trying to access sf data from external https site using Ajax toolkit with Firefox. I could get it to work with changing signed.applets.codebase_principal_support to true before. However now I update with the latest Firefox 2.0.0.2, and it is not working anymore. Anyone has an idea why or workaround? Thanks in advance.

Bagel
  • February 27, 2007
  • Like
  • 0
Hi,

I try to modify the probability value on opportunity before update, before insert, but it gives me an error. Is probability locked or something? Can anyone help? Thanks.


  • January 30, 2007
  • Like
  • 0
I got the following error msg as soon as I include my prototype array script to expand the methods of Array in my s-control. Any idea what happened?

{faultcode:'soapenv:Client', faultstring:'Attribute "xmlns" bound to namespace "http://www.w3.org/2000/xmlns/" was already specified for element "getUserInfo".', }

function (s) { var found = false; for (var i = 0; i < this.length; i++) { if (this[i] == s) { found = true; break; } } return found; }
function (a) { if (this.length != a.length) { return false; } for (var i = 0; i < this.length; i++) { if ((typeof this[i] != typeof a[i]) || (this[i] != a[i])) { return false; } } return true; }
function (func) { for (var i = 0; i < this.length; i++) { this[i] = func(this[i]); } }
function (value, index) { this.splice(index, 0, value); }
function (value) { this.insertAtIndex(value, this.length); }
function (index) { this.splice(index, 1); }
function (value) { var indexes = []; for (var i = 0; i < this.length; i++) { if ((typeof this[i] == typeof value) && (this[i] == value)) { indexes.push(i); } } for (var i = indexes.length - 1; i >= 0; i--) { this.splice(indexes[i], 1); } }
function () { var unique = []; var indexes = []; for (var i = 0; i < this.length; i++) { if (unique.indexOf(this[i]) == -1) { unique.push(this[i]); } else { indexes.push(i); } } for (var i = indexes.length - 1; i >= 0; i--) { this.splice(indexes[i], 1); } return unique; }
function () { var copy = []; for (var i = 0; i < this.length; i++) { copy[i] = (typeof this[i].copy != "undefined") ? this[i].copy() : this[i]; } return copy; }
function (index1, index2) { var temp = this[index1]; this[index1] = this[index2]; this[index2] = temp; }
function () { for (var i = 0; i < this.length; i++) { ind1 = Math.floor(Math.random() * this.length); ind2 = Math.floor(Math.random() * this.length); this.swap(ind1, ind2); } }
function () { var trim = []; for (var i = 0; i < this.length; i++) { trim[i] = this[i].trim(); } return trim; }
function () { for (var i = 0; i < this.length; i++) { if (this[i] == "") { this.splice(i, 1); } } }

  • January 29, 2007
  • Like
  • 0
I query a children dataset with parent id (master-detail datatype) as one of the columns using API 8.0. When I try to update the dataset, it gives error as the following:

{errors:{fields:Name,Opportunity__c, message:"Unable to create/update fields: Name, Opportunity__c. Please check the security settings of this field and verify that it is read/write for your profile.', statusCode:'INVALID_FIELD_FOR_INSERT_UPDATE',},id:null,success:'false',}

but it was working when I use API 7.0. Any clue anyone? Thanks


  • January 29, 2007
  • Like
  • 0
Hi all,

Just one quick question, if I create a child custom object under opportunity (or any object), if an opportunity gets deleted (a parent), do all the children get deleted automatically as well? Or I need to manually/programmatically clean things up? Thanks.


  • January 29, 2007
  • Like
  • 0
Hi all,

As my subject stated, Can I popup a SControl from Apex Code? If so, how do I do that? Thank you again.


  • January 26, 2007
  • Like
  • 0
javascript: openLookup('/_ui/common/data/LookupPage?lknm=CF00N30000001BYw0&lkfm=editPage&lktp=' + document.getElementById('CF00N30000001BYw0_lktp').value,670,document.getElementById('CF00N30000001BYw0_mod').value,'&lksrch=' + escapeUTF(document.getElementById('CF00N30000001BYw0').value),'maxw')
  • April 19, 2006
  • Like
  • 1

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

 

I run into a problem with the following line when I am not log in as Administrator. Does anyone know why and how to resolve this? Thanks in advance.

 

var tab = sforce.connection.query("Select w.id from WebLink w where Name='Advisor'").records.Id;

 

William

  • April 05, 2010
  • Like
  • 0

i am getting an error "sObject type weblink is not supported" when trying to query the weblink table from the api within an application to get the name of a custom button and link.  what permissions do i need to setup for the user's profile in the ui for this to work?

  • February 02, 2009
  • Like
  • 0
Hi there,

I upload some images & javascript files to Static Resource section. However when I try to access those resource in my S-Control by {!$Resource.resource_name}, it gives me a syntax error saying it does not exist. Do we allow to use Static Resource in our S-Control? If so, what did I do wrong? What is the correct way? Please help, and thanks in advance.
  • December 08, 2008
  • Like
  • 0
Hi everyone,

I have a question on how to access my attachment on Document section in my S-Control. Before, I was able to "copy and paste" the URL, and it worked fine. However, now it doesn't work anymore when I install my app to a different account. Salesforce support tells me that I need to create a query within the links to my internal items that call for the new ID then it will resolve to the new id for the document or object link.

However, what does that mean? How do I query my internal items? Can anyone give me an example or something? Thanks.


  • December 05, 2008
  • Like
  • 0
Hi,

I have an urgent problem that needs to figure out ASAP.

We have an app on appexchange. In our app, we use some internal link like so "https://na5.salesforce.com/servlet/servlet.FileDownload?file=01540000000KqY6" in our S-Control. As I understand, When an user install our app, AppExchange will will update these links with their environment setting. Everything is working fine since last week. But today, when a new user installed our app, the links don't update properly. Any ideas? does saleforce/appexchange change something? I need this resolves quickly. Please response. Thanks.

William
  • October 24, 2008
  • Like
  • 0
Hi all,

I have setup a managed package in Developer Settings. I would like to know if it is possible to change any of the options after? Because I don't see there is any Edit button in that section. Thanks.

  • November 20, 2007
  • Like
  • 0
Is it possible to initiate a session using an existing session id?

It seems like the beta version of the toolkit allowed you to do that while the release version requires you to call login(username, password) before you can call the api using javascript.

I have a page on my own server that needs to interact with the API. I have the server url and the session id so I'd like to be able to use those to initiate the session. Will connection.js handle it? Do I need to set a certain javascript variable to my session?

Thanks!
Hi All,

I was looking at the screencast for PTODemo (Time Off Manager App). I am very impressed with it. I am wondering if it is available for public use. One thing I am still wondering how to do, I noticed that after the demonstrator clicked on "Submit for Approval", the button (along with a few others) will no longer showing when next time the document opens. How to do that? Anyone?


  • April 04, 2007
  • Like
  • 0