• Penumaka
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello everybody,

I'm trying to set a record's field to blank using the function sforce.connection.update().
Here is my code:

Code:
newObject = new sforce.SObject("DocumentLink");
newObject.set("Id", linkedDocs[i]["Id"]);
newObject.set("Bookmark__c", bookmark);

// update Document Link object var result = sforce.connection.update([newObject]); for (var k=0; i<result.length ;k++ ){ if (result[k].getBoolean("success")){ } else { alert("Failed to store the bookmark changes! \n"+result[k]); } }

That works absolutly fine as long as bookmark is not empty.
But I want to be able to set the Bookmark__c field to be blank as well. How can a do that?
I tryed something link: bookmark=null and bookmark="". But non of them worked.

Seems like the method simply ignors the field if it is set to null or "".
Has anybody an idea??

Thanks,
Matthias