+ Start a Discussion

Override New button - can't get merge fields for lookup?

Hello.  I'm having an issue when I Override the New button a custom object.  I'm unable to get a value from the merge field or a specific object type.

I want to Override the New button for custom object X.  X has a master/detail relationship to Account, and a lookup relationship to Y.  I want to be able to go to the detail screen of a Y record, click New on the X related list, and I want to be able to access the Id of Y. 

However I don't seem to be able to get Y.Id.  I can get the Account Id (if I am on the Account detail page).  Is this because Y is a Lookup relationship and not a Master/Detail relationship?  Do I have to do this as a standard scontrol instead of as a New Button override?

Thanks for your time.

Did you resolve this issue. Our issue is when new is clicked and record type page displays, when a record type is selected, we either get a blank page or the record type page re-displays. Did you have problems with this?
Chris. I was attempting to do the same thing you were, and ran into the exact same problem. However I was wanting to create the "New" functionality from the Related List View. The only solution I found (and found it because of your post) is what you already pointed out.

"Do I have to do this as a standard scontrol instead of as a New Button override?"
- Yes.

I used a standard S-control, with an Custom List Button to do the job. Then I was able to get the merge Ids I was looking for. (Contact.Id in my case)


Message Edited by MikeWires on 04-10-2008 02:40 PM
interesting - very good to know.  thanks for posting!