12

In the Summer 20 release, the componentInstances property for FlexiPage regions has been removed. These need to be replaced with itemInstances as outlined in the release notes. More details on the structure of an ItemInstance metadata type is in the guide. For orgs that have been refreshed into the new version (like sandboxes and your production org at the ...


8

In short, yes, you're on a fool's errand. The general rule is that you can't package any settings that would allow granting 'system' permissions. That is, permissions that affect more than just the objects/schema that your package contains. For example, you can't package CRUD/FLS on Standard Objects and you can't grant System Permissions like ModifyAllData ...


7

There is --validatedeployrequestid or -q flag for force:mdapi:deploy -q, --validateddeployrequestid=validateddeployrequestid request ID of the validated deployment to run a Quick Deploy To run quick deploy of a recently validated package, use -q with the validated ID. sfdx force:mdapi:deploy -q <validationRequestId> -w -1 ...


7

In short: I managed to do this in Apex by using apex-mdapi AFTER I updated the code to support flowAccesses. - here's the github commit with changes needed to support it. This is the only way I can see to do this through Apex as you need to hit the Metadata API. Very Long Version I didn't see anything within SOQL or Tooling API that can be used. It seems ...


7

With the introduction of SFDX, we also got a new representation for the metadata/code known as "Source form". This is different from the traditional representation, which is called "Metadata API form" Source form is meant to be more flexible for project structure in versioning systems (git, subversion, etc...) and is also important for driving the pushing ...


6

Salesforce has exposed tooling api that can help you clone the Managed Package flow if it is packaged as template. Note you can wrap this tooling api via an apex class and achieve everything that API can do. To clone the flow via the api follow the below steps. PREREQUSITE : Note that for experiment i have installed a flow package here from appexchange that ...


6

You need to use both CustomLabel and Translations. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>*</members> <name>CustomLabels</name> </types> <types> ...


5

In the provided example, the core thing to bound this field to account is naming of .xml file. It will be Account.object-meta.xml. Therefore, the fields in xml with such name will be added to Account. It is also very important to deploy your archived xml files with proper names, so the organization understands what you want from it.


4

It's undocumented but it is available as enableOotbProfExtUserOpsEnable property in the communities settings metadata as of v47 (Winter '20). If you select the Allow using standard external profiles for self-registration and user creation checkbox and then retrieve the settings metadata using this package <?xml version="1.0" encoding="UTF-8"?> <...


4

You should be able to do this through a metadata deployment. If you have a test environment, you can try this out to see if it works. In API version 44.0 and later, you can do this all through the Flow metadata type (no need for FlowDefinition). https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_visual_workflow.htm You'll want to ...


4

Calling metadata API from LWC is not trivial as mentioned in Salesforce doc By security policy, sessions created by Lightning components aren’t enabled for API access. This prevents even your Apex code from making API calls to Salesforce. Using a named credential for specific API calls allows you to carefully and selectively bypass this security ...


4

This is a feature, not a bug. Depending on your development process, some options are available. Change Sets can be used to specify just the fields and record types you want to retrieve or deploy, then you can use that to deploy to other Sandboxes or Production either directly (via Outbound Change Sets) or indirectly (via sfdx or another tool). Scratch Orgs ...


3

The versioned FlowDefinition object is no longer recommended as of API 44.0, in favor of the unversioned Flow, which is the point at which behavior around Flow versions changed in the Metadata API. Using API version 43.0 or prior to retrieve FlowDefinition should return the original versioned files.


3

The place to look is the Metadata API Developer Guide, in the Metadata Types section. Note on terminology: these are not Custom Metadata Types. Custom Metadata Types are a specific Metadata API entity. CustomObject, for example, is a built-in Metadata API entity.


3

Nowadays, here is the setting: { "settings": { "enhancedNotesSettings": { "enableEnhancedNotes": true } } }


3

After many hours trying to look for every single issue mentioned on this page, and getting so angry about the lack of useful error messages in DX I was reminded that deployment settings may give more info. The error I was getting in DX was just N/A duplicate value found: <unknown> duplicates value on record with id: <unknown>. The Path was ...


3

You can get that in the Tooling API. Here's a query you can use to get started: SELECT Id, SubscriberPackageId, SubscriberPackage.NamespacePrefix, SubscriberPackage.Name, SubscriberPackageVersion.Id, SubscriberPackageVersion.Name, SubscriberPackageVersion.MajorVersion, SubscriberPackageVersion.MinorVersion, SubscriberPackageVersion....


3

I was able to deactivate process builder as follows: Retrieved FlowDefinition file for the process builder that I am trying to deactivate using the command sfdx force:source:retrieve --metadata=FlowDefinition:ProcessBuilderApiNameGoesHere Updated value for tag activeVersionNumber to 0. <?xml version="1.0" encoding="UTF-8"?> <FlowDefinition xmlns="...


3

I see TopicsForObjects in apex-mdapi. This is the below snippet from their code and taken from what's available in their github. public class TopicsForObjects extends Metadata { public String type = 'TopicsForObjects'; public String fullName; private String[] fullName_type_info = new String[]{'fullName',SOAP_M_URI,null,'0','1','...


3

It can be found in flexiPages folder in metadata. And inside the flexiPage you can see it: <flexiPageRegions> <componentInstances> <componentName>cmpYourLightningComponent</componentName> <visibilityRule> <booleanFilter>1 OR 2 OR 3</booleanFilter> <criteria> ...


3

When I've wanted to invoke this API from Apex in the past I have used this already generated and modified code: Apex Wrapper Salesforce Metadata API though it looks like it hasn't have much attention in recent years. It does support at least this version of the API: Summer'16 v37.0 Metadata API and probably v42.0 based on commit comments. The list of ...


3

Communities are not packageable for 2GP packages. As an unlocked package yes you can package up the ExperienceBundle (there are some known issues with ExperienceBundle as well on known issue site so do not recommend it as of today) but not as a 2GP yet. The only recommended way to package communities is via the "Bolt Solution" which allows you to ...


3

Yes, you have a limit of 10,000 components per deployment. You will want to exclude certain types, like Dashboards, Reports, Email Templates, and so on. The best way to deploy is in phases. You can do this in pretty broad strokes with some planning. CustomObject and CustomLabel can go first, then various auth methods (NamedCredentials, etc), then all code (...


2

$ is a reserved character in some terminals, so I had to escape $ like this --folder="unfiled\$public" Here is the complete command that is working: ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled\$public NOTE: I ran into this issue on macOS. Here is the bash script I created to prepare pacakge.xml ...


2

It's not that your org needs to be "upgraded", it's most likely your Ant salesforce-ant.jar file is outdated. Salesforce always runs on the latest version and is updated automatically during the release window. Try downloading the newest version, or consider installing the new Salesforce DX CLI instead.


2

Lightning Components' Apex controllers do not receive an API-enabled session: By security policy, sessions created by Lightning components aren’t enabled for API access. This prevents even your Apex code from making API calls to Salesforce. Using a named credential for specific API calls allows you to carefully and selectively bypass this security ...


2

In my experience, most of destructive changes can go through post destructive. Pre destructive is only needed when you want to make changes inside your deploy and you have some reference that isn't going to allow it. For instance, if you want to change some custom field type to another type that isn't allow you will need to delete it and all its references ...


2

Custom settings act like sObjects and therefore the fields Values you're talking about are just like any other record of any other Object, since on the change sets you're only deploying metadata, there's no records there, so the values of instances of Custom settings will not be populated by any deploy.


2

In addition to identigral great answer, here is the corresponding code for scratch org creation (project-scratch-def.json) "settings": { "communitiesSettings": { "enableNetworksEnabled": true, "enableOotbProfExtUserOpsEnable": true },


2

I was wondering if it's because the two orgs are in different pods. One org is in a pod in the Japan region, the other is in America's. Pretty nearly, yeah - the org's language. The language of the org is set when it's created - if it's a scratch org, for example, it can be set as language in the org definition file, or will take the default language of its ...


Only top voted, non community-wiki answers of a minimum length are eligible