You need to sign in to do that
Don't have an account?
GoForceGo
How do I create a lookup field in S-control
I want to create an S-control form where one of the fields is supposed to be a lookup field - e.g I want to define a field called "Contact" and be able to have the lookup icon.
When clicked it should show all salesforce contacts and when one is selected, populate it.
How do I do it?
When clicked it should show all salesforce contacts and when one is selected, populate it.
How do I do it?
And... yes, that's for a single lookup, and I don't even have all the required elements to make it look "Salesforce-like", just close enough to give you a text box and a magnifying glass. This whole magick code could break at any time; VisualForce is the only "guaranteed" method of not breaking lookup elements inbetween releases. So, enjoy the code, and have fun.
Message Edited by sfdcfox on 12-24-2007 03:48 PM
what if i wanted to do the same thing - but in an s-control accessed by a button on a page. For example - I would like to pre-populate the contact related lookup on the opportunity page.
so i created a button accessing an s-control, and my s-control looks like this
<script language="JavaScript">
function redirect() {
parent.frames.location.replace("/006/e?retURL=%2F{!Contact.Id}&RecordType=012200000004ZSp&conid={!Contact.Id}&
00N20000000vVQR={!Contact.FirstName}+{!Contact.LastName}&CF00N20000000vVQR_lkid={!Contact.Id}& CF00N20000000vVQR_lkoid={!Contact.Id}& CF00N20000000vVQR_lkold={!Contact.Id}& &CF00N20000000vVQR_lktp={!Contact.Id}& CF00N20000000vVQR_lspf= {!Contact.Id} & CF00N20000000vVQR_mod={!Contact.Id}&CF00N20000000vVQR_lkwgt={!Contact.Id}&accid={!Account.Id}&opp3={!Contact.FirstName} {!Contact.LastName} Follow Up- {!Today}&opp9={!Today}")
}
redirect();
</script>
it is still not populating though - any ideas?I have pre-populated a contact lookup on a custom related object - does this have to do with the opportunity role setup?
thanks!
Hudi
Does you know when VisualForce might GA?