• stoutstreet
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Hi,. I am trying to replicate the cook book recipe and I still get this error. Here is the script that I copied from the cook book. I tried this on IE and Firefox.

 

Thanks in advance for your help

*******************************************************************************************************************************

{!requireScript("/soap/ajax/20/connection.js")}
{!requireScript("/soap/ajax/20/apex.js")}

var idsToInsert = {!GETRECORDIDS($ObjectType.Account)};
var noteTitle = prompt("Please Enter the Note Title");
var noteBody = prompt("Please Enter the Body of the Note");
alert("Record length:" +idsToInsert.length);

if (idsToInsert.length) {

          // Making a synchronous call to apex

        var result = sforce.apex.execute("mcbangalore.Mass Note Insert", "insertNotes", {iTitle:noteTitle, iBody:noteBody,     iParentIds:idsToInsert});
                  
               alert(result[0] + "inserted");

} else if (idsToInsert.length == 0) {

        alert("Please select accounts to insert notes");
     

}