4

I'm currently struggling to get our Salesforce into a version control system with the "source" metadata format. And, of course, I want this repo to be deployable.

After about 16 ours of hacking away, I've finally figured out a subset of metadata which might be considered an essential "core".

This includes Zip_Code_Area__c, which has its own custom Lightning Record Page, which we also need.

However, deploying each of this Page is proving problematic.

Zip_code_Area_Record_Page.flexipage-meta.xml fails with "In Lightning component sortablegrid:sdg, property SDGConfiguration has an invalid value CustomObject:ZipCode Area Craftsman."

I can't seem to find any information how to fix this, but maybe (for now) we might be able to ignore it.

While I might be able to fix these issues by manually removing these references from the flexipage metadata, it would be a terrible workflow if we need to manually do this every time before we push the metadata and there would be the risk of accidentally commiting these changes. And obviously we don't want to commit these changes because eventually this repo should be part of the pipeline and we don't want to remove these things from production.

Any ideas how we should deal with this?

  • For a similar problem of flexipages and scratch org, we had to add a entry in .forceignore file to exclude those metadata files. – Raul Jul 6 at 14:01
  • Hi, you mention that your essential core contains two custom objects and two lightning record pages. The second error message says something about a lightning component sortablegrid:sdg - is this part of the second lightning record page? Is the lightning component also part of the deployment? You didn't mention yet where you're trying to deploy to, is it a scratch org? Or a sandbox from the same production instance? In a scratch org you might have to tune your settings so it is compliant with your production org. E.g it seems that Contact to multiple Accounts is required. – Magnus Kreth Jul 6 at 14:15
  • Are you working in scratch orgs or sandboxes? The first error is a feature mismatch - I don't think it's the same as the linked Known Issue. – David Reed Jul 6 at 14:52
  • @MagnusKreth, sortable grid is a 3rd party managed package which we will install before the deploy. – Brian Kessler Jul 7 at 8:21
  • @DavidReed, We are trying to deploy to scratch orgs so we can work with scratch orgs. – Brian Kessler Jul 7 at 8:21
1

Account_Record_Page.flexipage-meta.xml fails with "Component [force:relatedListSingleContainer] attribute [relatedListApiName]: Could not find related list [AccountContactRelations] for entity [Ac count]", which is a known Salesforce issue.

This sObject requires the Contacts to Multiple Accounts feature, which is enabled in your scratch org definition file by adding the entry ContactsToMultipleAccounts to your features list. I don't believe it is related to the linked Known Issue.

Zip_code_Area_Record_Page.flexipage-meta.xml fails with "In Lightning component sortablegrid:sdg, property SDGConfiguration has an invalid value CustomObject:ZipCode Area Craftsman."

I've never used the sortablegrid managed package. At a guess, it sounds like it may have an undeclared dependency on a custom object that is not part of the managed package. I would contact its developer or vendor for assistance on this one.

While I might be able to fix these issues by manually removing these references from the flexipage metadata, it would be a terrible workflow if we need to manually do this every time before we push the metadata and there would be the risk of accidentally commiting these changes

Yes, this kind of workflow is very messy, and while I don't think it's necessary here, there are situations where you have to do this kind of thing. We (Salesforce.org Release Engineering) use build scripts that mutate metadata immediately prior to deployment and then revert it afterwards, acting on tokens present in the metadata. That does require extra steps during development to preserve those crucial tokens, unfortunately.

| improve this answer | |
  • Re 1. I believe I tried with "ContactsToMultipleAccounts", but I'll double check that. Re 2. Unfortunately the managed package says no support is available on App Exchange; would you be able to share sample scripts for mutating the metadata? – Brian Kessler Jul 7 at 15:00
  • 1
    We use CumulusCI (cumulusci.readthedocs.io), an open source CI tool built by our team. We incorporate a task called findReplace in our deployment flows to target a specific token we embed in FlexiPage metadata and replace it with supplied text. Usually this is to inject a managed package namespace where it's required in a particular context. – David Reed Jul 7 at 15:19
  • Followup: Issue #1 is fixed and removed from scope of problem. – Brian Kessler Jul 7 at 15:19
  • Cheers for link to Cumulus. I'll try to find some time to look into it. :-) – Brian Kessler Jul 7 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.