You need to sign in to do that
Don't have an account?

dynamically add a pagelayouts to the profile
hai all
i need a write dynamically add a pagelayouts to the profile through apex code using vfpage also
how can i do that
i need a write dynamically add a pagelayouts to the profile through apex code using vfpage also
how can i do that

You can not do this using apex. What you want to achieve is modify metadata from an apex classs, this is not possible IMO.

Not sure if this solves your issue but you can dynamically assign Record Type per profile and page layout for this record type will get assigned automatically.