• Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

How to retrieve Page Layout Assignment for a profile using Tooling REST API?

Using Force.com Tooling API(REST),How do I get the page layout-record type assignments for the given profile id?

Requesting with

/services/data/v36.0/tooling/query?q=Select+Name,+Metadata+From+Profile+where+Id='00eXX000000XXXX'+limit+1

responds with blank nodes for recordtypes etc.

Is it even possible to retrieve the full metadata of Profile object with Tooling API?

Sachi's user avatar

In short term, the layout assignment information is listed in RecordType instead of Profile.

When you retrieve whole SObject Describe from this endpoint:

The response have a "recordTypeInfos" section like this:

For each recordTypeInfo, it contains a value called url:

If you send a GET request to this endpoint, in the response you will see the Layout Id in:

So the mapping is already done by salesforce. That layout id reflects the layout assigned to the current user.

Saffire Alex's user avatar

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged api salesforce force.com tooling or ask your own question .

  • The Overflow Blog
  • One of the best ways to get value for AI coding tools: generating tests
  • The world’s largest open-source business has plans for enhancing LLMs
  • Featured on Meta
  • User activation: Learnings and opportunities
  • Site maintenance - Mon, Sept 16 2024, 21:00 UTC to Tue, Sept 17 2024, 2:00...
  • What does a new user need in a homepage experience on Stack Overflow?
  • Announcing the new Staging Ground Reviewer Stats Widget

Hot Network Questions

  • Сhanging borders of shared polygon shapefile features in QGIS
  • Could Prop be the top universe?
  • Subject verb agreement - I as well as he is/am the culprit
  • Does SpaceX Starship have significant methane emissions?
  • Why is steaming food faster than boiling it?
  • Rocky Mountains Elevation Cutout
  • Is a thing just a class with only one member?
  • Why does a capacitor act as an open circuit under a DC circuit?
  • How to prevent a bash script from running repeatedly at the start of the terminal
  • Whom did Jesus' followers accompany -- a soldier or a layman?
  • How should I email HR after an unpleasant / annoying interview?
  • Custom PCB with Esp32-S3 isn't recognised by Device Manager for every board ordered
  • What factors cause differences between dried herb/spice brands?
  • Why do I often see bunches of medical helicopters hovering in clusters in various locations
  • History of the migration of ERA from AMS to AIMS in 2007
  • Offset+Length vs 2 Offsets
  • What would be an appropriate translation of Solitude?
  • How did NASA figure out when and where the Apollo capsule would touch down on the ocean?
  • Why is resonance such a widespread phenomenon?
  • Can landlords require HVAC maintenance in New Mexico?
  • What are the pros and cons of the classic portfolio by Wealthfront?
  • Function with memories of its past life
  • Why does Sfas Emes start his commentary on Parshat Noach by saying he doesn't know it? Is the translation faulty?
  • Definition of annuity

layout assignment metadata salesforce

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Is Page Layout Assignment in SFDX source?

I'm noticing that every time I spin up a new scratch org, I lose the page layout assignments I've specified for each of my Product2 recordtypes.

Is page layout assignment something that's supposed to be included in my SFDX project source? If so, does anybody have any ideas about why that isn't being pulled down when I do a force:source:pull? And if not, has anyone come up with any workarounds for this issue?

  • salesforcedx

AGallinat's user avatar

  • Did you pull the Profile object as well? If not, then that would be an expected behavior. –  sfdcfox ♦ Commented Dec 14, 2017 at 23:22
  • I didn't think it was possible not to. I understood that force:source:pull is going to pull all the custom metadata in a scratch org regardless of type. Is there something specific I need to do to reference specific metadata types? –  AGallinat Commented Dec 14, 2017 at 23:51
  • @AGallinat Did you find out how to get the layout assignment metadata? –  Carl Otto Gjelsvik Commented Jan 22, 2019 at 14:14

2 Answers 2

I noticed that to get layout assignment you have to specify that you want to retrieve Profile, Layout, RecordType and CustomObject at the same time. You may also want to provide your_custom_object, like this:

pawel221's user avatar

For some reason, changing page layout assignments isn't detected by sfdx force:source:status or pull. I got the whole profile metadata using

Then snipped out everything except the layoutAssignments snippet(s) I wanted.

MayTheSForceBeWithYou's user avatar

  • 1 Any idea why both sfdx force:source:retrieve and sfdx force:mdapi:retrieve aren't giving me the layoutAssignments? –  digglemister Commented Apr 6, 2021 at 1:02

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged salesforcedx ..

  • The Overflow Blog
  • One of the best ways to get value for AI coding tools: generating tests
  • The world’s largest open-source business has plans for enhancing LLMs
  • Featured on Meta
  • User activation: Learnings and opportunities
  • Site maintenance - Mon, Sept 16 2024, 21:00 UTC to Tue, Sept 17 2024, 2:00...

Hot Network Questions

  • Subject verb agreement - I as well as he is/am the culprit
  • Why does Sfas Emes start his commentary on Parshat Noach by saying he doesn't know it? Is the translation faulty?
  • How can I switch from MAG to TRU heading in a 737?
  • Doesn't nonlocality follow from nonrealism in the EPR thought experiment and Bell tests?
  • Can landlords require HVAC maintenance in New Mexico?
  • Is it defamatory to publish nonsense under somebody else's name?
  • Is it true that before European modernity, there were no "nations"?
  • Do carbon fiber wings need a wing spar?
  • What factors cause differences between dried herb/spice brands?
  • In Photoshop, when saving as PNG, why is the size of my output file bigger when I have more invisible layers in the original file?
  • Multi-producer, multi-consumer blocking queue
  • Does a Malaysian citizen require a Canadian visa to go on an Alaskan cruise
  • Place with signs in Chinese & Arabic
  • AWK search for multiple patterns in a file
  • Definition of annuity
  • Сhanging borders of shared polygon shapefile features in QGIS
  • On the history of algae classification
  • Equation of Time (derivation Analemma)
  • Input impedance of an op amp when sharing bias resistor across multiple op amps
  • mmrm R package : No optimizer led to a successful model fit
  • How should I email HR after an unpleasant / annoying interview?
  • Why was Esther included in the canon?
  • Does SpaceX Starship have significant methane emissions?
  • Could Prop be the top universe?

layout assignment metadata salesforce

IMAGES

  1. Guide to Page Layouts in Salesforce

    layout assignment metadata salesforce

  2. Guide to Page Layouts in Salesforce

    layout assignment metadata salesforce

  3. Pro Tip: Harness Your Salesforce Metadata in Lightning Experience

    layout assignment metadata salesforce

  4. Page Layouts in Salesforce

    layout assignment metadata salesforce

  5. Salesforce Metadata Visualization and Discovery Software Safyr®

    layout assignment metadata salesforce

  6. [SalesForce] get the field layout metadata from record page

    layout assignment metadata salesforce

VIDEO

  1. Day 08

  2. Permission Sets with Page Layout Assignment and Dynamic Forms in Salesforce

  3. Session 6 Salesforce Page layout assignment

  4. Customize the Position Page Layout || Customize the User Interface for a Recruiting App

  5. 4. Metadata: Field search

  6. Page Layout and Record Type

COMMENTS

  1. Page layout assignments with XML metadata API

    Stack Exchange Network. Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.. Visit Stack Exchange

  2. Layout

    This type extends the Metadata metadata type and inherits its fullName field. To edit the Ideas layout, specify it by name in the package.xml file. In package.xml, use this code to retrieve the Ideas layout. <types> <members>Idea-Idea Layout</members> <name>Layout</name> </types>. Note.

  3. metadata api

    The deployment succeeds, but there is no change in the page layout assignments when viewed in Setup in the org. I thought perhaps I need to also deploy the Account.object and the Account-Custom Account Layout.layout files along with the Profile. Again that deploy succeeds but does not modify the page layout assignments for the System ...

  4. salesforcedx

    Details. You're asking two things. Compact Layout Assignments. This is stored in the custom object metadata under compactLayoutAssignment within the RecordType property so you need to include whatever object you're changing the record type/compact layout assignment. It'll look like something like this within the metadata you pull

  5. ArticleType Layout

    ArticleType Layout. Represents the metadata associated with an article type page layout. Article type layouts determine which fields users can view and edit when entering data for an article. Article type layouts also determine which sections appear when users view articles.

  6. Retrieve Page Layout Assignment using package.xml in SFDX

    I tried this using ANT migration tool and it worked. I retrieved all profiles, record types and Page layouts. It retrieved layout assignments as well. Give it a try. Here is my package.xml. * Layout * Profile * RecordType 52.0. answered Apr 4, 2022 at 3:54. Naval.

  7. Salesforce: Page layout assignments with XML metadata API

    Salesforce: Page layout assignments with XML metadata APIHelpful? Please support me on Patreon: https://www.patreon.com/roelvandepaarWith thanks & praise to...

  8. PDF Metadata API Developer Guide

    the Save button. Presentation metadata concerns the layout of your org, and authorization metadata determines user access. Salesforce metadata also describes your org's general configuration. For example, you can configure Chatter to block emoticons in posts. Metadata API works with metadata types and components. A metadata type defines the ...

  9. Assign Page Layouts to Profiles or Record Types

    Salesforce Authenticator MFA Issue Impacting Android Users Read More. Close. Extend Salesforce with Clicks, Not Code. Table of Contents. Close. Search. After defining page layouts, assign which page layouts users see. A user's profile determines which page layout he or she sees. In addition, if your organ...

  10. salesforce

    In short term, the layout assignment information is listed in RecordType instead of Profile. When you retrieve whole SObject Describe from this endpoint:

  11. Layout Class

    Layout Properties. The following are properties for Layout. customButtons. The custom buttons for this layout. customConsoleComponents. Represents custom console components (Visualforce pages, lookup fields, or related lists) on a page layout. emailDefault. Default value for the email checkbox. Only relevant if the showEmailCheckbox property is ...

  12. Deploy Flexipage Assignments

    Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site

  13. Metadata API Developer Guide

    Represents the metadata associated with a compact layout. This type extends the Metadata metadata type and inherits its fullName field. A compact layout displays a record's key fields at a glance in the Salesforce mobile app, Lightning Experience, and in the Outlook and Gmail integrations. For more information on compact layouts, see Compact ...

  14. Change Page Layout Assignment to User Custom Layout

    Salesforce Authenticator MFA Issue Impacting Android Users Read More. Close. ... Change Page Layout Assignment and Fields of User Setting Object. Change Page Layout Assignment of Sales Organization Object. ... Downloading Latest Metadata. Download Latest Metadata. Mobile App Themes.

  15. Profile

    A profile defines a user's permission to perform different functions within Salesforce. This type extends the Metadata metadata type and inherits its fullName field. In API version 29.0 and later, you can retrieve and deploy access settings for these managed components in profiles and permission sets: Apex classes.

  16. Assign Compact Layouts to Record Types

    Customize Page Layouts with the Enhanced Page Layout Editor. User Interface Elements for the Enhanced Page Layout Editor. Standard Object Record Page Save Options on Page Layouts. Tips for Using the Enhanced Page Layout Editor. Assign Page Layouts to Profiles or Record Types. Edit Multi-Line Layouts for Opportunity Products.

  17. page layout

    2. From documentation: Compact layouts are defined as part of the custom object, standard object, or external object definition. You need to have it defined in the Object's metadata xml definition as below: <fullName>testCompactLayout</fullName>. <compactLayoutItems>textfield__c</compactLayoutItems>. <label>testCompactLayoutLabel</label>.

  18. Metadata Types

    Some Salesforce features have metadata types that aren't available in Metadata API. These metadata types can't be retrieved or deployed with Metadata API. To make changes to these types, you must do it manually in each of your organizations. Special Behavior in Metadata API Deployments.

  19. Missing <compactLayoutAssignment> in th

    Run metadata deployment with either remove or comment out <compactLayoutAssignment> in the metadata object source file. Observe if the Compact Layout Assignment changed/reset to Primary in the Object Manager page. Re-run the same metadata deployment include the <compactLayoutAssignment> field with desired value in the metadata object source file.

  20. metadata api

    OR. sfdx force:source:retrieve -m Layout. You may like to verify if you have the Layout attribute added in your package.xml. This has worked for me in VS Code, if at all you are open to this option. Create a Project with Manifest. In the package.xml, specify the layouts (make sure you have it in package.xml), example as below:

  21. salesforcedx

    3. I noticed that to get layout assignment you have to specify that you want to retrieve Profile, Layout, RecordType and CustomObject at the same time. You may also want to provide your_custom_object, like this: sfdx force:source:retrieve -m Profile,Layout,RecordType,CustomObject:your_custom_object. Share.

  22. Change Page Layout Assignment and Fields of User Setting ...

    From Setup, go to Object Manager, and then find and select User Setting. Click Fields & Relationships, and then perform these steps: Click Landing Page. In the Values section, click New. Add AdvancedUserCockpit. Save your changes. Click Page Layouts, and then click User Setting Layout. Click Related Lists, and then drag Managed Products to the ...

  23. LayoutSection Class

    The following are properties for LayoutSection. Indicates if this section's label is custom or standard (built-in). Controls whether this heading appears on the detail page. Controls whether this heading appears on the edit page. The label; either standard or custom, based on the customLabel property. Lists the layout columns.