function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Beginner_sforceBeginner_sforce 

How Do I update a custom field content using a custom lookup dialog(which is an S-control)

Hi, I've been wanting to make an s-control with the exact same look and feel as the standard lookup dialog in SF. I've manage to make this however, I can't find a way to pass the value to the custom field once the user clicks on the anchor, this is the anchor.:
 
html.push("<a class=\"dataCell\" onclick=\"top.window.opener.lookupPick('null','CF00N700000028MtX_lkid','CF00N700000028MtX','','"+record_id.substring(0,15)+"','"+record.Name+"','','');setParentField("+record.Name+");window.close();\" href=\"#\">"+record.Name+"</a>");
 
this is the original anchor code:
 
<a class="dataCell" onclick="top.window.opener.lookupPick('null','CF00N700000028MtX_lkid','CF00N700000028MtX','','a0DT0000000UNoE','A-2378','','')" href="#">A-2378</a>
 
I noticed this is written inside a form that I can use, but I'm not sure what to change in the action attribute.
<form id="new" onsubmit="if (window.ffInAlert) { return false; }" name="new" method="get" action="/_ui/common/data/LookupResultsFrame">

 

any help will greatly be appreciated,thanks.


Beginner_sforceBeginner_sforce
As of right now, my code will update the lookup field content, but it won't actually show the content.
 
 
JShaffJShaff
Were you able to get this figured out?  I have a similar situation.
 
Thanks -
Beginner_sforceBeginner_sforce
Nope, in  the end I just make the lookup dialog updates the value in the database and reload the parent window. Anyway, one of my friend told me that it's a bad idea to integrate your code with their frontend because it might break after a while.