Hot Posts

6/recent/ticker-posts

FlexiPage in Salesforce lightning

FlexiPage in Salesforce lightning

What is a FlexiPage in Salesforce lightning?

FlexiPage is a representation of a Lightning page. A Lightning page is a customizable page composed of regions containing Lightning components. It includes access to the associated FlexiPage object in the Metadata API. It represents the metadata associated with a Lightning page. A Lightning page represents a customizable screen made up of regions containing Lightning components. A Lightning page region can contain up to 25 components. Lightning pages are referred to as FlexiPages in the API and referred to as Lightning pages elsewhere in SFDC documentation.
Note:Flexipage can be defined in XML file and then deploying it using Eclipse, Ant Migration tool, workbench or any other migration tool. There is no way to define Flexipage directly in Salesforce using point and click functionality.Flexi page can contain List View, Recent Items, Report chart, Visualforce page and Global actions.

How to Create a Flexipage in Salesforce?

Creating a Flexipage in Salesforce is a simple and straightforward process. It involves using Salesforce’s Lightning App Builder, a user-friendly interface that allows you to create and customise your Flexipage with just a few clicks. Here’s a step-by-step guide to help you do it.

Step 1: Open the Lightning App Builder

Begin by selecting the ‘App Launcher’ (grid icon situated at the top left of your navigation bar) and type in “Lightning App Builder” to find it. Select the Lightning App Builder option that appears.

Step 2: Create a New Lightning Page

In the Lightning App Builder, you’ll see an option to create a new Lightning Page. Click on the ‘New’ button.

Step 3: Choose Page Type

A dialog box will open, prompting you to decide the type of page you wish to create. You can choose from a Home Page, Record Page, or App Page, depending on where you want this Flexipage to be used. Click on your preferred option and then click ‘Next’.

Step 4: Configure Page Settings

You will then need to fill in some basic information about your new page. Enter a name for your Flexipage and, if needed, a description. Then select the object type if you’re creating a record page. Once done, click ‘Next’.

Step 5: Select a Page Template

Now, choose a layout for your Flexipage from the available templates. These templates determine the structure and number of regions on your page. Choose an option that aligns with your requirements and click ‘Next’.

Step 6: Add Components to Your Page

You’re now ready to start building your Flexipage. On the left-hand side, you’ll see a palette of standard, custom, and third-party components that you can add to your page. To incorporate a component, simply drag it and drop it into the required area on your page.

Step 7: Configure Components

After adding components, you can configure them by clicking on the component and adjusting the properties in the right-hand panel. Here you can edit labels, set component visibility rules, and more.

Step 8: Save and Activate Your Page

After you have completed adding and setting up the components, select ‘Save’ at the top right corner to store your new Flexipage. But your page won’t be available to users until you activate it.

To do this, click ‘Activation…’ in the top right corner. Here you can set your page as the default for all users or for specific apps, record types, and profiles. After making your choices, click ‘Assign as Org Default’, ‘App Default’, or ‘Record Type Default’, then ‘Save’.

Congratulations! You’ve now successfully created a new Flexipage in Salesforce. This page is now ready to be used and can be further edited or customised at any time.

How to Edit Flexipage in Salesforce?

Editing a Flexipage in Salesforce is a simple process, allowing you to tweak your interface to best suit the ever-changing needs of your users. Below is a step-by-step guide on how to do it.

Step 1: Open the Lightning App Builder

The Lightning App Builder is your gateway to editing Flexipages in Salesforce. To open it, click on the ‘App Launcher’ (the grid icon in the left corner of the navigation bar) and type “Lightning App Builder” into the search bar. Click on the Lightning App Builder option that appears.

Step 2: Select the Flexipage to Edit

You will now be presented with a list of all the Flexipages you have generated. To edit a Flexipage, locate it in this list (you can use the search bar for quick access) and click on its name. This action will load the Flexipage in the Lightning App Builder.

Step 3: Make Your Changes

Now, you’re ready to edit your Flexipage. You can add, remove, or rearrange components by dragging and dropping them into the desired regions of your page. If you want to add a new component, click on the ‘Components’ tab on the left side of the screen and drag your chosen component onto the page.

To edit a specific component, click on it. This will open a panel on the right side of the screen where you can tweak the component’s properties, like its label, visibility, and more.

Step 4: Configure Component Visibility

Flexipage offers a powerful feature called ‘Component Visibility’ that allows you to control when a component is visible based on certain criteria, such as the user’s profile, a field’s value on a record, or device type. To manage component visibility, click on the component and then select ‘Add Filter’ under the ‘Component Visibility’ section in the panel on the right.

Step 5: Save and Activate Your Changes

Once you’ve made all your changes, don’t forget to save them by clicking the ‘Save’ button in the upper-right corner. But saving your changes doesn’t mean they’ll immediately appear to your users. For that, you need to activate your page.

Click ‘Activation…’ in the top-right corner. In the resulting dialog, you can choose to set your page as the default for all users or for specific apps, record types, and profiles. Make your choice, then click ‘Assign as Org Default’, ‘App Default’, or ‘Record Type Default’, and ‘Save’. Your changes are now live.

That’s it! You have now edited a Flexipage in Salesforce. Keep in mind, you can return at any time to modify as required.

How to Delete a Flexipage in Salesforce?

Deleting a Flexipage in Salesforce is a relatively straightforward procedure, but it’s crucial to remember that it’s a permanent action. Once a Flexipage is deleted, it’s gone for good, so proceed with caution.

Start by navigating to the Salesforce Setup, accessible via the gear icon in the top right corner of your interface. Here, look for and select ‘Lightning App Builder’ using the quick find box. You’ll then see a list of all the Lightning Pages or Flexipages in your Salesforce org. Simply locate the Flexipage you wish to delete.

To delete a Flexipage, select the dropdown arrow next to the ‘Edit’ button corresponding to your chosen page. From this dropdown, select ‘Delete’. You’ll be met with a warning popup to ensure you understand the implications of this action. Confirm the deletion if you’re certain, and just like that, you’ve removed a Flexipage in Salesforce. Always double-check before deleting to prevent the permanent loss of important interfaces.

Difference Between Flexipage and Lightning Page

The terms “Flexipage” and “Lightning Page” often cause confusion for Salesforce users as they’re sometimes used interchangeably. However, the fact of the matter is, there’s no actual difference between the two. Both terms represent the same concept in Salesforce.

A Flexipage, also known as a Lightning Page, is a custom layout that enables you to create pages in Salesforce by using various components on a single page. This feature is part of the Salesforce Lightning Experience, a modern, fast, and beautiful user interface.

Flexipage comes from ‘flexible pages,’ indicating the core ability of this feature: to create flexible, dynamic layouts using various components. These components can be rearranged and customised based on user needs, providing a dynamic user interface that can display a variety of content.

Both terms represent the same concept in Salesforce. A Flexipage is the metadata for a Lightning page, which includes Lightning record pages, home pages, and app pages on a single page.

Similarly, a Lightning Page is a reference to the Lightning Experience, where these pages are created and managed. Salesforce Lightning is an upgraded version of Salesforce that offers a sleeker, more modern user interface along with a host of new features, and the ability to create and customise Flexipages (or Lightning Pages) is a key aspect of this upgrade.

Lightning Pages

Lightning Pages are really FlexiPages, a metadata type that represents a customizable screen that can contain Lightning Components. Lightning Pages can be modelled in app builder or community builder, dragging & dropping existing components. However in some cases, there is no possibility yet of using such features and we have to use Metadata API or Tooling API to create them.

First of all, take a look at this schema, in which I have tried to capture all the possible Lightning Page types.

Let’s take a look at the FlexiPage metadata API documentation to see which types of FlexiPages (or Lightning Pages). Let’s divide them in groups:

First, we have:

  • HomePage—used to override the Home page in Lightning Experience.
  • RecordPage—used to override an object record page in Lightning Experience.
  • AppPage—used as the home page for a custom app.

These three types of Lightning Pages can be modelled on App Builder.

If you create home or record pages, you will be able to easily assign them to different applications and/or profiles.

In the AppPage case, you will have to do some more steps, first create a Tab for the Lightning Page, and then embed it in a Salesforce1 or Lightning App navigation menu. Note that an AppPage can be used both in Salesforce1 and Lightning Experience, while Home or Record pages cannot.

Then, we have:

  • CommRecordPage—used to override a record page in Lightning Experience, as created in the Community Builder, in Communities.
  • CommAppPage— used to represent a custom page, as created in the Community Builder, in Communities.
  • CommObjectPage—used to override an object page in Lightning Experience, as created in the Community Builder, in Communities.
  • CommQuickActionCreatePage—used to override a create record page in Lightning Experience, as created in the Community Builder, in Communities.
  • CommRelatedListPage—used to override a related list page in Lightning Experience, as created in the Community Builder, in Communities.
  • CommSearchResultPage—used to override a search result page in Lightning Experience, as created in the Community Builder, in Communities.
  • CommThemeLayoutPage—used to override a theme layout page in Lightning Experience, as created in the Community Builder, in Communities.

As you see, all these types of pages can be modelled on Community Builder. I am not going to explain the details of each type, but we will see how to configure Lightning Components to be used in these pages later.

Then, we have the next one:

  • UtilityBar—used as the utility bar in Lightning Experience apps.

If you don’t know Utility Bar yet, check this post or read the implementation guide. Utility bar is a persistent horizontal footer that you can add to applications in Lightning Experience. The good news is that Lightning Components can be embedded there, as it is really a FlexiPage. Since Spring 17 Lightning Components can be added declaratively to Utility bar through App Manager.

And finally, we have

  • MailAppAppPage—An email application pane used to override the default layout for Lightning for Outlook.

This page is used in Lightning for Outlook and Lightning for Gmail feature, that has been made Generally Available on summer 17. With this feature, you can drag-and-drop Lightning Components in the Email Application Pane for Lightning for Outlook and Lightning for Gmail.

If you want your Lightning Components to be ready to be part of these pages, your component should implement one of these interfaces:

  • flexipage:availableForAllPageTypes— available for home, record, app pages and utility bar
  • flexipage:availableForRecordHome— available for record pages
  • forceCommunity:availableForAllPageTypes— available for all community pages
  • clients:availableForMailAppAppPage— available for Mail App pages

Additionally, if you want your components to be sensitive to the context in which they are embedded, these two interfaces will be useful for you:

  • force:hasRecordId— will expose the Id of the record for which the page is being rendered, as an attribute in the component (if it is a record page or community record page).
  • force:hasSObjectName—will expose the sObject API name of the record for which the page is being rendered, as an attribute in the component (again, if it is a record page or community record page).

Conclude :

To deploy a Flexipage (Lightning Record Page) that is activated and assigned as org default, you should utilize the "CustomObject" component type. You can add the "CustomObject" component to a branch and then deploy it to the target organization.However, if you need to activate a Lightning record page and assign it to specific profiles, record types, and applications, then you should use the "CustomApplication" component type.To deploy such a Flexipage assignment, you'll need to include the "CustomApplication" component in a branch and then deploy it to the target organization. correct this sentance

Post a Comment

0 Comments