• ywang
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi all!
 
I am working on developing a scon to copy an Account just like the copy button on Opportunity scene.
But a multi -select item was found not  be copied well
 
For Example, The original item has  multi-selected  a,b and c. the copied item will be shown as "a;b;c"  in one row.
 
 
The source code of the s-con is as following.
 
<body onLoad="document.myForm.submit()">
<form method="POST" action="/001/e" name="myForm">
<input type=hidden name="RecordType" id="RecordType" value="012100000008S5Z">
 
<input type=hidden name="00N10000000IlGg" id="00N10000000IlGg" value="{!Account_MHFGSections3}">

</body> 
 
Bye the way, I knew that the same problem could be done by using URL as following
But for this case I have over 50 choices, so the URL pattern will not work .
 
Could  anybody  give me a hint?
 
  • September 26, 2006
  • Like
  • 0
The value "None" is included in the picklist of "OpportunityAccessLevel". But I failed in trying to delele a manually set OpportunityShare object  by AJAX API.
the erroe means that "None" is an invalid value for OpportunityAccessLevel.
 
The source code is as following.
 
      var contact = new Sforce.Dynabean("OpportunityShare");
      contact.set("ID","00t10000001TvMi");
      contact.set("OpportunityAccessLevel","None");
      contact.set("UserOrGroupID","00510000000LjoT");
      var saveResult = sforceClient.update([contact]);
By the way, the action of create succeeded.
 
Look forward for any advice.
  • May 18, 2006
  • Like
  • 0
Is there any way to keep IE from popping up this "Alert" when using an Scontrol?



I tried putting the Scontrol in a popup window with no content around it at all... and still I received this alert...
When I click "No" it still works, however it is quite annoying and no matter how much I try to explain it, my customers especially my financial sector customers are very nervous.

-=Bryan

Update
I found out the line that's causing the alert to show up.
It's the sforceClient.init(...)
Also interesting is the order in which the coded alerts show up in.. their display order is denoted by the number at the beginning.

Code:
function initPage() {
  //Initialize the connection to salesforce.com by setting the sessionid and the
  //soap endpoint in the init call
  alert("1 initPage::before sforceClient.setLoginUrl"); 
  sforceClient.setLoginUrl("https://www.salesforce.com/services/Soap/u/7.0");
  alert("2 initPage::before sforceClient.registerInitCallback");
  sforceClient.registerInitCallback(startUp);
  alert("3 initPage::before sforceClient.init");
  sforceClient.init("{!API_Session_ID}", "{!API_Partner_Server_URL_70}", false); //this line throws the security alert
  alert("5 initPage::after sforceClient.init");
}

//=======

function startUp() {
  alert("4 startUp");
}

 

Message Edited by BJames on 05-03-200611:03 AM

i'm trying to do lead conversion from the ajax api. Here's my function:

function convertlead(LeadID) {
//Convert lead
var qr = sforceClient.Query("Select Id From Lead Where Id = '" + LeadID + "'");
var lead = qr.records[0];

ContactID = sforceClient.ConvertLead(lead);

}

I get this error:

Error on line 384 of document https://sandbox.sforce.com/ajax/beta2/sforceclient.js: leadConverts.toSoap is not a function

Any thoughts on what I'm doing wrong?



UPDATE: I figured out I need to create a LeadConverts object to pass to ConvertLead. If anyone has a sample of this at their fingertips, I'd be much obliged. Thanks!



Thanks,
Steve

Message Edited by gokubi on 11-23-2005 06:57 AM

  • November 23, 2005
  • Like
  • 0