0

How to assign Page Layout of an Object (Standard or Custom ) to Profile via SOQL

Is that possible?

Note:- I know how to do that via SFDC UI. I would like to automate this assignment.

harrybvp
  • 2,445
  • 2
  • 22
  • 30

1 Answers1

1

Page Layouts are not available via SOQL or Apex. It has been proposed as an idea and needs more upvotes: https://success.salesforce.com/ideaView?id=08730000000KmowAAC

What you CAN do is use the metadata API. You'd have to muck around with building the right XML that defines the layout assignment. Check out https://salesforce.stackexchange.com/questions/852/page-layout-assignments-with-xml-metadata-api

Community
  • 1
  • 1
Egor
  • 1,622
  • 12
  • 26