0

Problem Description

If I include a Layout metadata in my package which includes the default global actions, such as NewTask, NewEvent, etc. there will be an error trying to install the package (I'm trying to install it onto a scratch org)

I have created a quick action and added it to one of the Object's layout, which was why in the Object layout metadata file, they pulled all the relevant quick actions.

Relevant Snippets & Screenshots

Attached below is a snippet of the layout metadata file:

<platformActionList>
        <actionListContext>Record</actionListContext>
        <platformActionListItems>
            <actionName>FeedItem.TextPost</actionName>
            <actionType>QuickAction</actionType>
            <sortOrder>0</sortOrder>
        </platformActionListItems>
        <platformActionListItems>
            <actionName>FeedItem.ContentPost</actionName>
            <actionType>QuickAction</actionType>
            <sortOrder>1</sortOrder>
        </platformActionListItems>
        <platformActionListItems>
            <actionName>NewEvent</actionName>
            <actionType>QuickAction</actionType>
            <sortOrder>2</sortOrder>
        </platformActionListItems>
        <platformActionListItems>
            <actionName>NewTask</actionName>
            <actionType>QuickAction</actionType>
            <sortOrder>3</sortOrder>
        </platformActionListItems>
        ...
</platformActionList>

And this is the command I'm running on the cli:

sf package install -p 04t5g0000002finAAA -b 10 -w 10 -o test

And this is the error I encountered:

Encountered errors installing the package! Installation errors:
1) (Contestant__c-Contestant Layout) In field: QuickAction - no QuickAction named NewEvent found, Details: Contestant__c-Contestant Layout: In field: QuickAction - no QuickAction named NewEvent found

A workaround I have found was to include all the NewTask, NewEvent quickAction metadata in the package, but upon installation, that would result in 'duplications' of the same global actions (albeit with different namespace). I referred to a old SDO org that I have access to, and it seems like Salesforce packages such as FSL, and Salesforce CPQ does the same, bloating the Global Actions. Is that the only way up till today?

enter image description here

1
  • Have you correctly enabled the underlying platform feature, such as Chatter, as part of the scratch org def? We package layouts and as long as the standard actions relate to features available on the subscriber org all is fine.
    – Phil W
    Commented Oct 4, 2023 at 11:22

0

You must log in to answer this question.