• Stack Overflow Public questions & answers
  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Talent Build your employer brand
  • Advertising Reach developers & technologists worldwide
  • Labs The future of collective knowledge sharing
  • About the company

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.

Retrieve Page Layout Assignment using package.xml in SFDX

I'm trying run sfdx:...retrieve using package.xml profiles, record types and page layouts. Retrieve is working as designed, but Page Layout Assignment is not getting retrieved. is not getting created in the package.

Based on the articles it should be created for this configuration.

  • variable-assignment

Edward Koucherian's user avatar

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

Naval'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 deployment salesforce variable-assignment profile or ask your own question .

  • Featured on Meta
  • Upcoming sign-up experiments related to tags
  • The return of Staging Ground to Stack Overflow
  • Policy: Generative AI (e.g., ChatGPT) is banned

Hot Network Questions

  • Worship and Wandering
  • Ideal test/p-value calculation for difference in means with small sample size and right skewed data?
  • What did Jesus mean when he asked "If then David doth call him lord, how is he his son?
  • Is there a category even more general than "thing"?
  • How to Ask a Top Professor to Co-Author a Paper with Me?
  • Transpose these notes!
  • How many vials would reasonably fit inside of a chest?
  • I formatted the /boot/efi partition to upgrade Lubuntu and now I can't boot Windows
  • Could a Google Chrome extension read my password?
  • When should a function be given an argument vs getting the data itself?
  • Would you be able to look directly at the Sun if it were a red giant?
  • Keep your ----- ◯ and find the answer!
  • MileagePlus upgrade on United for international flight segment booked on Y class when there are domestic segments that have class V
  • Expand a `.cs` defined by key inside the function
  • Stepper Motor: Understanding why missed steps are multiples of 4
  • The connection between determinants and eigenvalues
  • I did not contest a wrong but inconsequential accusation of plagiarism – can this come back to haunt me?
  • How do we measure inductance with a DC source?
  • Problem with internal forces in spring following Hooke´s law
  • What is more correct: Mass or Weight and Balance?
  • NaN is not equal to NaN
  • Entering Australia with a Transit Visa on an Indian Passport
  • Can the Orient Express be motorized to run on standard track?
  • Switching between batteries and a power supply

page layout assignment metadata salesforce

About 30 mins

Learning Objectives

  • Challenge +500 points

Configure Page Layouts and Record Types

After completing this unit, you’ll be able to:

  • Set up the page layout for a record type.
  • Create a record type.
  • Use a record type to assign a page layout to a profile.

Create a Page Layout for Readers

Article readers and article authors perform different actions and see different fields on a knowledge article, so Maria must create different page layouts for these users. She creates the page layout for readers first. Let’s follow along and see what she does.

Setup icon.

  • Click Object Manager and select Knowledge .
  • Click Page Layouts .
  • Click New .
  • If you’re basing the page layout on an existing layout, choose it. Maria selects None .
  • Enter the name of your page layout. Maria enters Procedure - Reader .
  • Click Save .

The layout editor opens. Let’s take a moment to get acquainted with it.

Knowledge object with Page Layouts selected to show the page layout editor.

  • Knowledge object (1)
  • Page Layouts (2)
  • Palette (3) —The palette contains Fields, Related Lists, and Mobile & Lightning Actions that you can add to your page layouts. In this example, Fields is selected, so the palette displays available fields. You can also create custom fields.
  • Salesforce Mobile and Lightning Experience Actions (4) —This section displays actions users can perform on the page. Drag items from the Mobile & Lightning Actions palette to add them to this section.
  • Knowledge Detail (5) —Drag items from the Fields palette to add them to the page layout. In this example, the first section is named Knowledge Details, and it contains Title and URL Name.

Add Actions and Fields

Maria keeps the palette open and consults the list she made with Ada. She’s going to set up the page layout section by section: actions readers can perform, article information, article details, and article properties.

First, she sets up the actions that readers can perform on the article.

  • In the palette, click Mobile & Lightning Actions .
  • Hover over the Salesforce Mobile and Lightning Experience Actions section.

Override.

  • Drag Post to the Salesforce Mobile and Lightning Experience Actions section. Post allows users to post to the Article Feed.
  • Drag Poll next to Post.

Next, she sets up the Knowledge Detail section. The Title and URL name fields are already there and set as required. She adds one field.

  • In the palette, click Fields .
  • Drag Summary to the Knowledge Detail section.

Now she creates a section with more information about procedures.

Page layout showing the Section field being dragged below the Knowledge Detail section.

  • Name the section. Maria enters Article Details .
  • Leave the defaults checked, then click OK .

Maria has to create custom fields to finish the Article Details section. She decides to create the other sections first and then come back to the custom fields. Here’s what she does.

  • To reopen the editor after saving, click Page Layouts .
  • To reopen the page layout, click Procedure - Reader .
  • Create a section under Article Details. Maria uses the following values:
  • Section Name: Properties
  • Layout: 2-Column
  • Tab-key Order: Top-down
  • Add the following fields to the first column:
  • Article Created Date
  • Last Modified by
  • Last Published Date
  • Add the following checkboxes to the second column:
  • Visible in Internal App
  • Visible to Customer
  • Visible to Partner
  • Visible in Public Knowledge Base

Create Custom Fields

Maria has set up everything she can using the fields in the palette. On to creating custom fields for the Article Details section.

The first field she creates is Procedure Audience, a text field for describing an article’s audience.

Setup icon.

  • Click Fields & Relationships .
  • Choose the field type. Maria chooses Text Area (Rich) .
  • Click Next .
  • Fill out the values. Maria uses these values.
  • Field Label: Procedure Audience
  • For Length, # Visible Lines, and Field Name she leaves the default values.
  • Description: Use this field to identify who follows or executes this procedure.
  • Help text: Who follows this procedure?
  • Establish field-level security. Maria selects Visible for all profiles.
  • Add the field to the palette for the page layout you’re creating. Maria chooses Procedure - Reader . Salesforce adds the new field as the last field in the first section by default. That’s where Maria wants it to go, but she can move it anytime if she changes her mind.

Maria repeats these steps to create custom fields for Procedure Warnings, Procedure Purpose, and Procedure Steps. She makes sure that the fields are in the correct order in the Article Details section.

Here’s her finished page layout for procedure readers.

The Actions, Information, Article Details, and Properties sections with the appropriate fields inside.

Create a Page Layout for Authors

The Procedure - Author and Procedure - Reader page layouts are similar. But the author page has some different actions and an extra field for internal notes. The Internal Notes field is available only to agents who can author articles. Maria creates the Procedure - Author page layout from the existing Procedure - Reader layout.

Setup icon.

  • If you’re basing the page layout on an existing layout, choose it. Maria selects Procedure - Reader .
  • Name the page layout. Maria enters Procedure - Author .

Maria changes the actions. Instead of Poll and Post actions, Maria includes: Edit, Publish, Delete Article, Change Record Type, Edit as Draft, Delete Draft, Submit for Approval, Assign, Archive, Restore, and Post.

She creates a custom field for Internal Notes using the following values.

  • Data type: Text Area (Rich)
  • Field Label: Internal Notes
  • Field-level security: Custom: Support Profile . Maria created this profile for Ursa Major when she set up the knowledge base.
  • Page layout: Procedure - Author . This adds the field to the Procedure - Author page layout at the bottom of the first new section. Maria makes a note to ask Ada later if she should add this field to the FAQ - Author page, too.

Here’s what Maria’s page layout for Procedure - Author looks like with the new fields.

Page Layout for Procedure - Authors showing all actions and fields, including the new Internal Notes field and the extra actions.

Create and Assign a Record Type for Procedures

Maria has created two different page layouts—one for readers and one for authors. Now she creates a record type to show the correct page layout to the correct users. How does she know which users are which? By their profiles. Customers see the Procedure - Reader page layout. Agents see the Procedure - Author page layout.

Here’s how Maria creates and assigns the Procedure record type.

Setup icon.

  • Click Record Types .
  • Select an existing record type to use as a template. The new record type includes the picklist values of the selected record type. Maria chooses Master .
  • Enter a label for your record type. Maria enters Procedure .
  • Enter a description. Maria enters For step-by-step instructions .
  • Select Active to make this record type available immediately.
  • Select the profile that will use this record type. Maria selects Make Available next to the Customer profiles listed.
  • Select the page layout that users with these profiles see for this record type. Maria chooses Procedure - Reader .

All users assigned the Customer profiles see the Procedure - Reader page layout. They can view articles, but they can’t edit them.

Next, Maria assigns the Procedure - Author page layout to agents using the regular profile user interface. Agents can edit articles.

Setup icon.

  • Enter Profiles in the Quick Find box, then select Profiles .
  • Select a profile. Maria chooses Custom: Support Profile , a profile she created earlier.
  • Scroll down to Custom Record Type Settings and click Edit .
  • Move the needed record types from the Available Record Type box to the Selected Record Types box. Maria adds FAQ and Procedure .
  • Choose a default record type. Maria chooses FAQ .

Maria’s configured a new type of article, procedures, in Ursa Major’s knowledge base. To do it, she created different page layouts and assigned them to the correct users via record types. It’s time for Ada to start creating the procedures.

In addition to page layouts, you can also add and customize components on record pages. Maria doesn’t need that level of customization, but you might. To learn more, check out the Lightning App Builder module.

  • Salesforce Help: Create Custom Fields
  • Salesforce Help: Page Layout Considerations for Lightning Knowledge
  • Salesforce Help:  Record Type Considerations for Lightning Knowledge
  • Salesforce Help: Create and Edit Articles
  • Trailhead: Lightning App Builder
  • Salesforce Help: Assign Record Types and Page Layouts in the Enhanced Profile User Interface
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities

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 ..

  • Featured on Meta
  • Upcoming sign-up experiments related to tags

Hot Network Questions

  • A "hard core" Sci-Fi movie featuring alien "invasion/infiltration" and a dome creating an atmosphere of methane and ammonia
  • NEC Code requirements for location of neutral and ground connections
  • Short story about a man born in a society of inductive reasoning, who steals a rocket to escape
  • What will happen if we keep bringing two protons closer and closer to each other, starting from a large distance?
  • I formatted the /boot/efi partition to upgrade Lubuntu and now I can't boot Windows
  • Is there a formulation of topology which excludes most of the pathological objects?
  • Does Echo's "random Boon from the previous night" include Boons from the Pitch Black Stone?
  • Why is "Colourless green ideas sleep furiously" considered meaningless?
  • Would you be able to look directly at the Sun if it were a red giant?
  • Help identifying planes from June 20 near Centennial airport in Colorado
  • A short story about an ancient anaerobic civilisation on Earth
  • YA Book about two siblings and their uncle, who built a magical cabinet
  • How and why did baptism become linked to Apostle's Creed "forgiveness of sins" in the 381 Nicene-Constantinopolitan Creed?
  • How can UserA programmatically replace a text string within a file they own that's located in /etc?
  • Recommendations Modifying/increasing a bicycles Max Weight limits
  • What is the minimum number of avoids for Dota 2 never ever have a match?
  • Is it correct to call a room with a bath a "toilet"?
  • Is my understanding of Quine's Bizet-Verdi counterfactuals correct?
  • Translation of "und der Gitarre traurig Klang" in the German version of "Remember me" from the movie "Coco"
  • What is the stronger emotion - to be annoyed or to be bothered?
  • Does Last Gasp count Death Defiances used before getting the Boon?
  • Find 10 float64s that give the least accurate sum
  • Door latch can be forced out of strike plate without turning handle
  • Is there a category even more general than "thing"?

page layout assignment metadata salesforce

VIDEO

  1. Next.js Metadata Title Template 💡 #nextjs #nextjstutorial #nextjs14 #reactjs #webdeveloper

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

  3. How To Export Custom Metadata Types In Salesforce?

  4. Citect SCADA Power Tools Metadata from Excel

  5. Create Stunning Landing Page with Next js and Framer Motion

  6. Salesforce inspector

COMMENTS

  1. Layout

    This type extends the 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.

  2. Page layout assignments with XML metadata API

    2. They're not too bad; you can either hand code the package.xml file (which I did since our org is still new and not overly complex) or use the Force.com IDE to generate the XML. Once you have that the ANT makes it super simple to retrieve and deploy. - Mike Chale. Commented Aug 23, 2012 at 16:45. Add a comment.

  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. 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.

  5. 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...

  6. FlexiPage

    This type extends the Metadata metadata type and inherits its fullName field. These pages are known as FlexiPages in the API, but are referred to as Lightning pages in the rest of the Salesforce documentation and UI. Note. In API version 49.0 and later, arrays in a FlexiPage are represented as valueList.

  7. metadata api

    6. I also tried the below commands and it worked fine. sfdx force:source:retrieve -x ./manifest/package.xml. 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.

  8. HomePageLayout

    This metadata type represents the valid values that define a home page layout: The name can only contain characters, letters, and the underscore (_) character. The name must start with a letter, and can't end with an underscore or contain two consecutive underscore characters. Inherited from the Metadata component, this field isn't defined ...

  9. 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 ...

  10. Configure Page Layouts and Record Types

    Click Object Manager and select Knowledge. Click Record Types. Click New. Select an existing record type to use as a template. The new record type includes the picklist values of the selected record type. Maria chooses Master. Enter a label for your record type. Maria enters Procedure. Enter a description.

  11. Assign Page Layouts to Profiles or Record Types

    Select Filters. Check the spelling of your keywords. Use more general search terms. Select fewer filters to broaden your 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...

  12. Tips & Hints for Page Layouts and Field-Level Security

    From a page layout, click Mini Page Layout. Assign page layouts to users based on profiles and record types. This determines which layouts users will see when viewing different record types. From a page layout, click Page Layout Assignment. Go to the fields area to verify that all field access settings are correct.

  13. pagelayoutassignment

    However, when I created a new Contact on a System Administrator user, it was still using the default Contact Layout. Even stranger, if I manually clicked Edit for the Contact page layout assignment, and immediately clicked save without changing anything, my "New Layout" would take effect. This indicates to me that there is probably an extra ...

  14. Assign Record Types and Page Layouts in Profiles

    From Setup, in the Quick Find box, enter Profiles, and then select Profiles. Select a profile. In the Find Settings... box, enter the name of the object you want, select it, and then click Edit. In the Record Types and Page Layout Assignments section, make changes to the settings as needed.

  15. Metadata Types

    Represents assignment rules that allow you to automatically route cases to the appropriate users or queues. You can access rules metadata for all applicable objects, for a specific object, or for a specific rule on a specific object. ... Represents the metadata associated with a page layout. For more information, see Page Layouts in Salesforce ...

  16. Page layout on custom metadata type

    If the field is not added to the page layout when you want to create the records for the custom metadata by using manage record button then you will not be able to see that field in the layout. Edit or create record page: Share. Improve this answer. answered Jan 27, 2022 at 8:11. SaiPraveen Kakkirala.

  17. Change the Page Layout Assignment

    Required Editions. From Setup, go to Object Manager. From Setup, in the Quick Find box, enter User, and then select User. Click User Page Layouts, and then click Page Layout Assignment. Click Edit Assignment. Select the System Administrator profile and then select User Custom Layout as the page layout to be used. Save your changes.

  18. 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

  19. 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 ...

  20. Configure Default Record Type

    Add Your Record Page to the Salesforce Mobile App. Enable Chatter, Notes, and Attachments for Consumer Goods Objects ... Deploy Additional Metadata. Static Resource Files. Create HKey Field. Handle Validation Rules. Upload Static Resource Data. ... Change Page Layout Assignment and Fields of User Setting Object.

  21. Is Page Layout Assignment in SFDX source?

    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. Improve this answer.

  22. Assign Page Layouts in the Original Profile User Interface

    From Setup, in the Quick Find box, enter Profiles, and then select Profiles.; Select a profile. Click View Assignment next to any tab name in the Page Layouts section.; Click Edit Assignment.; Use the table to specify the page layout for each profile. If your organization uses record types, a matrix displays a page layout selector for each profile and record type.