function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andrew Tzikas 9Andrew Tzikas 9 

Set Home Flexipage as Org Default via the API

I have a new Lightning Home Page that I would like to push out to my customers and set it automatically as the Org Default via the metadata API. Salesforce documentation (https://developer.salesforce.com/docs/atlas.en-us.208.0.api_meta.meta/api_meta/meta_flexipage.htm)here makes it sound like its a possibility by setting the sObjectType as null but its not working. So I am wondering now if its even possible to set the home page as a default programmatically. Any thoughts?

{
actionName: "View",
comment: "Action override updated by Lightning App Builder during activation.",
content: "My_New_Home_Page_Layout",
formFactor: "Large",
skipRecordTypeSelect: "false",
type: "Flexipage",
pageOrSobjectType: "null",
},

 

SwethaSwetha (Salesforce Developers) 
HI Andrew,
I see you also posted on https://salesforce.stackexchange.com/questions/388622/set-home-flexipage-as-org-default-via-the-api

Does the approach suggested in https://salesforce.stackexchange.com/questions/272046/how-to-set-org-wide-default-home-page-through-metadata-api-not-for-specific-app help?

Thanks
Andrew Tzikas 9Andrew Tzikas 9
Hi @Swetha, I saw that post as well, however, was looking at a more simplistic approach that would just activate the home page layout via the API similar to the record pages. Is there a specific expeception in why you can easily activate record pages via the API vs the home page? Is it because of a profile thing? Any insight would be great!