• mschmidt
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 9
    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

Hello everbody,

I'm using the URLFOR function to replace a standard "New"-Button by an S-Control. What this S-Control only adds some additional behavior when the user clicks the "Save"-Button. I managed to integrate this behavior using the saveURL parameter of URLFOR. The "Cancel"-Button also does, what it should do using the cancelURL parameter. But I don't know how to adapt the behavior of the "Save&New"-Button, because I don't know the appropriate URLFOR parameter.

Has anybody an idea how this parameter is called? Something link: saveNewUrl, saveAndNewUrl, ... ?
To get a better idea, what I'm talking about, here is my code.

The S-Control which replaces the standard "New"-Button:
Code:
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html>
  <head>
   <script type="text/javascript" src="/js/functions.js"></script>
   <script src="/soap/ajax/10.0/connection.js"></script>
   <script type="text/javascript">
    window.parent.location.href = "{!URLFOR($Action.AppTest2__Assessment__c.New, null, 
[saveURL=URLFOR($SControl.Save_Assessment, null, null, true),
cancelURL=URLFOR($Request.retURL, null,null,true)], true)}";
</script>
</head>
<body>
</body>
</html>

Notes:
"Assessment" is the object I want to create and "Save_Assessment" is the S-Control which add's some behavior whenever the user hits the "Save"-Button.


Thanks in advance,
Matthias
Hello everybody,

I have the following problem.
I want to develop some kind of generic tree browser to navigate around the salesforce data. I've already implemented a flex tree browser that uses SOQL queries for one specific datatype. But to have it in a generic way I would need an easy going API by which I can access the data.

So my question now is:
Is there such a kind of API for Flex and where to start for that?

Thanks & Cheers,
Matthias
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

Hello everbody,

I'm using the URLFOR function to replace a standard "New"-Button by an S-Control. What this S-Control only adds some additional behavior when the user clicks the "Save"-Button. I managed to integrate this behavior using the saveURL parameter of URLFOR. The "Cancel"-Button also does, what it should do using the cancelURL parameter. But I don't know how to adapt the behavior of the "Save&New"-Button, because I don't know the appropriate URLFOR parameter.

Has anybody an idea how this parameter is called? Something link: saveNewUrl, saveAndNewUrl, ... ?
To get a better idea, what I'm talking about, here is my code.

The S-Control which replaces the standard "New"-Button:
Code:
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html>
  <head>
   <script type="text/javascript" src="/js/functions.js"></script>
   <script src="/soap/ajax/10.0/connection.js"></script>
   <script type="text/javascript">
    window.parent.location.href = "{!URLFOR($Action.AppTest2__Assessment__c.New, null, 
[saveURL=URLFOR($SControl.Save_Assessment, null, null, true),
cancelURL=URLFOR($Request.retURL, null,null,true)], true)}";
</script>
</head>
<body>
</body>
</html>

Notes:
"Assessment" is the object I want to create and "Save_Assessment" is the S-Control which add's some behavior whenever the user hits the "Save"-Button.


Thanks in advance,
Matthias
I've looked up as many examples of URLFOR as I can find, and I think I'm following them nicely, but I'm getting an error when I try to save the S-Control that says Syntax error.  Found '['
 
I'm putting the [ just where it seems it should go in the examples.  Can anyone tell me what the problem is then with this thing??
 
thanks!!!
 
 
window.parent.location.href="{!URLFOR($Action.Project__c.New, null,[00N20000001AgKn=Case.Workstation_Product__c,00N20000001Aelf=Case.LastModifiedDate,
CF00N20000001Aels=Case.Related_Opportunity_Name__c,
00N20000001AgKr=Case.Workstation_Product_Version__c,
CF00N20000001Aelp=Case.Business_Contact__c,
CF00N20000001Aell=Case.Opportunity_Account__c],null)}"
Hello everybody,

I have the following problem.
I want to develop some kind of generic tree browser to navigate around the salesforce data. I've already implemented a flex tree browser that uses SOQL queries for one specific datatype. But to have it in a generic way I would need an easy going API by which I can access the data.

So my question now is:
Is there such a kind of API for Flex and where to start for that?

Thanks & Cheers,
Matthias
Hello,
 
Is there a way to access data through a parent child relationship without using a querry?
 
I have an object Vehicle__c where the field Driver__c is a lookup to a Contact. I would like to have the AccountId of that contact. I tried the following, but it returns always null (although the AccountId of that Contact is not null):
 

for(Vehicle__c vehicle : System.trigger.new){

System.debug('vehicle.Driver__r.AccountId = '+vehicle.Driver__r.AccountId);

}

Is there another way, or do I have to use a querry?

Thanks for your help,

François de Bergeyck

I would like our users to be able some objects and relationships in an
expandable  tree based form. Can anyone suggest the best way to do this, e.g.
S-Control, VisualForce, Ajax?

Thanks,

Andy
Assuming the structure for a queryresult is different in Flex (not sure if it is?), how can I get to the values stored within the objects which the queryresult brings back.

Specifically, I have a query which is bringing back 3 columns and 1 record.  2 out of the 3 columns are actually relationship objects with multiple records contained within them.  I need to get the values in the fields of these relationship objects in order to do processing with them...

This pseudo format is returning blank when I can see the data in the apex explorer-

queryresult.records[0].relationshipobject[0].customfieldname

Any help is greatly appreciated...
Okay lets see if I can clearly articulate this question. It has to do with sending a return URL as part of an s-control. What I want to do is from an s-control have a button that links to the create a new contact page and then once the contact is created returns them to the s-control.
 
Here is my issue...
 
Do do this I have to build the retURL into the link to the Contact create page:
 
 
I have to pass two GET variables.
 
1. The account id -> accid=VALID_ACCOUNT_ID
2. The return variable -> retURL=servlet/servlet.Integration?lid=ID_OF_S_CONTROL&eid=ID_OF_OBJECT
 
The problem is that the retURL has to contain 2 of it's own GET variables...eid & lid. After the contact is created it does not properly read the return URL and shoots me back to the standard detail view of the contact....not the s-control.
 
So I tried to replace all the unsafe char in the retURL with safe char and it still does not work:
 
 
Any ideas? Is this possible? Any help/direction would be greatly appreciated.
Hi:


I was trying to use the regular saleforce Lookup (the one with a magnify glass) in my S-control. it is invoked by a java script call to openLookup('/widg/lookup_fs.jsp?*****').

Can some one explain how to use this method?
and how does the search result gets back to my form?

thanks,