+ Start a Discussion

To populate a standard field with a value from temporary variable using S-control

hi, I am able to prepopulate fields using current record values like
parent.frames.location.replace("/006/e?retURL=%2F006%2Fo&RecordType=012500000009ELe&opp4={!Permits_Wells__c.Account__c}") }
 but now my requirement is to populate a standard field 'account name(acc2)'with a temporary variable 'name1' using
parent.frames.location.replace("/001/e?retURL=%2F001%2Fo&acc2=name1") } I tried using this but this is not working. Is there any problem with the syntax. Any help is appreciated. thanks in advance.
I think it should be written this way :
name1 is a JavaScript variable, you have to concatenate it (+ operator) with the rest of the string, in order for the URL to be evaluated like : parent.frames.location.replace("/001/e?retURL=%2F001%2Fo&acc2=xxxx")
hi, Thanks alot for your reply. My code is working now.