You need to sign in to do that
Don't have an account?
montblanc2000
s-control custom input page with lookup fields
Does anybody know how I can set 'lookup' fields through an s-control? I have an s-control that is a custom input page (overrides the 'edit' and 'new' buttons on a custom object) that creates a new object--a 'location'. I managed to get it to pass data for 'text' fields using [new object].set, but it fails when it comes to 'lookup' fields. I have tried passing both the name of the item as well as its id and neither worked. Any thoughts? Thanks in advance.
Paul
Paul
What I'm first trying to do is to display info from the lookup field. So, what I do is I run the query and include the field in the query and then, I reference it when I display Account information.
I think I have to reference the field as Acct_Mail_Ownr_nm__r.name. The __r structure comes along with a custom field when it is of Lookup type.
If you haven't downloaded Sforce Explorer, I strongly suggest you do it so you can 'inspect' your data structures and even run live queries against the data.
So, far, I'm struggling with getting the lookup data to display on the screen.
Now, what you're doing is trying to edit that data, right? I'm not sure how (if possible) to do that within S-Controls.
Visual Force, on the other hand, is an amazing tool. The downside is that we're just not sure when it's going to go into production. We're hoping for spring, but SF hasn't gotten to the point where they'll commit to that time table (to the best of my knowledge - I might be wrong).
As I get deeper into all of this, I'll update this thread.
Thanks for the tip on Sforce Explorer--I haven't been able to get Eclipse to work properly so it's been quite a hassle for me using just the web interface.
What sort of problems are you having displaying the data?
Well, when I run the query and try to reference the __r.name field, it gives me an error message. I opened up a ticket on it & will bring it up during a call in about 1/2 hr.
What kind of Eclipse issues are you having? Are you behind a firewall? That took us a while to solve. I did try to apply the latest upgrade of Apex plugin & it didn't work - but, I have most of what I need going in Eclipse right now. - We're even using Subversion for version control.