You need to sign in to do that
Don't have an account?
Make a new object on another objects page
Hi there,
I've a junction object between two custom objects (Person and Address, the junction object is called Person Address). Thus I've a many-to-many object.
I've got the Person page layout to display the list of Addresses associated with the Person, I'm not so bothered about the Address page displaying Persons!
I can associate a Person with an Address only when the Address has already been created. Is it possible to create a new Address whilst still on the Person page?
I'm thinking it is though it might require a custom VisualForce page, not an issue but a pointer in the right direction would be very helpful. I've been scouring Google for ages but my Google-foo must be lacking as I'm not able to see anything quite like what I need :-(.
Thanks in advance
Dom
Hi,
You can create a custom button on the person object .when user click on the custom button user will redirect on the address creation page
For creating a custom button follow the below steps:
For example: https://ap1.salesforce.com/a03/e?
Setup->create-> Objects->click on person object->click on new button present in Custom Button or Link
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
You can achieve this using a trigger on Person Address object. But for that there should be some unique identifier for address. So basically the trigger will check for it and if not found in the DB it will create new one. Now here question arises as to what information can be put in Address. Then you might have to use a VF page with help of apex controller. So when there is no match found for the current address, popup a new window for Address creation.
Hey there,
thanks for the reply. I'm thinking that I need to add something to the Person page so that I can automagically create another Address and then select it in the Address Lookup field but I'm looking for an example. Do you know of one at all?
Thanks again,
Dom
Hi,
You can create a custom button on the person object .when user click on the custom button user will redirect on the address creation page
For creating a custom button follow the below steps:
For example: https://ap1.salesforce.com/a03/e?
Setup->create-> Objects->click on person object->click on new button present in Custom Button or Link
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi Ankit,
that's lovely and your instructions were very clear, thank you.
Not quite what I was looking for but it will do as a stop gap.
What I want is to do within a block of ajax so I guess I'll have to work on it some more.
In the meantime if anyone else has any other ideas I'd be grateful.
Thanks again,
Dom