Master/Detail Select master id when adding details

Hi!

I'm trying to add a "SiteContact" entry to my "Site". When I Select the Site I am able to add SiteContacts however I would like the Site to be automatically selected when adding the detail (green box below). (it doesn't make sense to select anything other than the site i clicked on obviously)

screeny below...

I have done the following, not sure where to go from here...

TIA
Xarion

Goto the SiteContacts Add Button Click Event-> Add a New Page Parameter(AddSiteContacts) CurrSiteID and pass the PagePropety SelectedSiteID. In the page load event of AddSiteContacts Page you can set the page parameter to required rID property.

2 Likes

Hello Vinod

I have added the Page parameter and the following to the LoadData event of the Add Site Contact page.

However I still don't know how to set the value and the text of the Site to the selected one.
This gives me a compile error...

It would in-fact be better not to have the Site droplist at all, its obvious that i'm adding a contact for the selected site.

First step you have done is correct. Now proceed to bind the site dropdown to PageSiteID. Alternatively you may keep the original binding[scaffolded page] of the drop down as it is [or remove the dropdown] you can set sitecontact.SiteID=${parameters.SelectedSiteID} as step 4 in page load event.

HI Vinod

I have used the page generation for the master/detail and it has done all that I've needed to do above.

Thank you for the help.