I am creating a page that let's me create multiple objects at once. The thing is that I want it to be dynamic so that an admin can modify it simply by changing the standard page layouts to make new fields show up or remove other ones. The User can also select record types here to change what layout is in use. Is there an example of how to do this somewhere? I recall seeing it once, but I can't seem to find an example anywhere via google/stack exchange.
-
standard Edit page or standard View page (or both)?– cropredyMar 28, 2016 at 17:30
-
@cropredy Standard Edit.– dphilMar 28, 2016 at 17:44
-
I would have suggested fieldSets but I see you already know this - salesforce.stackexchange.com/a/27826/2602 :-) - otherwise, deconstruct pagelayout from metadata api - developer.salesforce.com/docs/atlas.en-us.api_meta.meta/…– cropredyMar 28, 2016 at 19:40
-
@cropredy Yes, those are both options I am currently looking at. I think I may try using the metadata api. My front end skills are weaker though making using it a bit harder. I wanted to stay away from the change set so that an admin doesn't have to do anything special.– dphilMar 28, 2016 at 20:39
-
so, you would be using metadata api to generate dynamic VF components a la developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/… ? you may have less front end work than you think unless you aren't used to VF.– cropredyMar 28, 2016 at 22:39
1 Answer
You can use the detail to expose the standard page layout on a visualforce page. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_detail.htm
-
1There are no Ids at this point besides for RecordType. It also needs to put these in edit mod. I don't think this would help.– dphilMar 28, 2016 at 16:57
-
Understood. If you need to create/edit then you might consider using the standard create/edit page but adding a parameter to return you back to your visualforce page once the detail record has been created. Here is a good description raydehler.com/cloud/clod/… Mar 28, 2016 at 17:01
-
1Sorry that doesn't help either. They want all of the info for multiple objects on a single page so they can eliminate clicks.– dphilMar 28, 2016 at 17:03