2

I'm developing an app on Salesforce DX that includes some reports and dashboards. However, when I attempt to pull from my scratch org (named Scratch7) with the following command:

sfdx force:source:pull -u Scratch7

the SF CLI produces the following output:

=== Pulled Source
No results found

I've verified the following:

  • The reports and dashboards exist in the correct scratch org.
  • The reports and dashboards are not excluded in the .forceignore file.

Is it possible to pull dashboards and reports with DX? I believe this can be accomplished through the metadata API, but that negates some of the advantages of using DX.

Edit:

I reproduced the behavior by creating a new scratch org and a new DX project. I created a report in the new scratch org and ran sfdx force:org:pull -u TestProject and no report was retrieved.

3

Looks like you will need to put your reports in the Public Unified folder and then the command sfdx force:source:pull retrieves .

I created a report in personal folder and the command did not retrieve it .I think this is how even original metadata retrieve used to work so only workaround is make sure they are in a public folder .

3
  • I moved the reports to the Unified Public Reports folder, pulled again, and the reports were successfully retrieved. – salesforce-hacker Nov 17 '17 at 15:32
  • Ain't working here. Tried the shit out it to move the reports across all folders with no luck. The only thing that works is pushing reports from local to remote. Modifying report and pulling it back - impossible. – dzh Jun 30 '18 at 20:10
  • @dzh The answer was accepted and at the time of writing this worked .If it is not working ,I will investigate and add comment .Also would be good to see if this is an issue with DX product team .A negative upvote does not help here – Mohith Shrivastava Jun 30 '18 at 21:16
1

Salesforce DX supports dashboards and folders, as outlined in the supported metadata components documentation. The entire list included below.

In order to make sure that the components are retrieved, make sure you add them to the package.


  • ActionLinkGroupTemplate
  • AnalyticSnapshot
  • ApexClass
  • ApexComponent
  • ApexPage
  • ApexTrigger
  • AuraDefinitionBundle
  • BusinessProcess
  • CompactLayout
  • CompanySettings
  • ConnectedApp
  • ContentAsset
  • CorsWhitelistOrigin
  • CspTrustedSite
  • CustomApplication
  • CustomApplicationComponent
  • CustomField
  • CustomLabel(s)
  • CustomMetadata
  • CustomObject
  • CustomPageWebLink
  • CustomPermission
  • CustomTab
  • Dashboard
  • DashboardFolder
  • Document
  • DocumentFolder
  • DuplicateRule
  • EmailFolder
  • EmailTemplate
  • ExternalDataSource
  • FieldServiceSettings
  • FieldSet
  • FlexiPage
  • FlowDefinition
  • GlobalPicklist
  • GlobalValueSet
  • HomePageComponent
  • HomePageLayout
  • Layout
  • Letterhead
  • LookupFilter
  • MatchingRule(s)
  • NamedCredential
  • PermissionSet
  • PlatformCachePartition
  • QuickAction
  • RecordType
  • RemoteSiteSettings
  • Report
  • ReportFolder
  • ReportType
  • Scontrol
  • SharingReason
  • StaticResource
  • Translations
  • ValidationRule
  • WaveApplication
  • WaveDashboard
  • WaveDataflow
  • WaveDataset
  • WaveLens
  • WaveRecipe
  • WebLink
  • WorkflowAlert
  • WorkflowFieldUpdate
  • WorkflowFlowAction
  • WorkflowOutboundMessage
  • WorkflowRule
  • WorkflowTask
6
  • 1
    Perhaps I should modify the question, but I'm wondering why the pull command isn't pulling my reports and dashboards. Does something else need to be configured? – salesforce-hacker Nov 16 '17 at 19:52
  • @salesforce-hacker According to the docs, if you put it in the package, it should be pulling it. I don't have a namespace where I can play around with it, but try packaging it up and see what happens. – sfdcfox Nov 16 '17 at 19:56
  • I currently don't have a package for my code, I'm just running a pull on the scratch org. All the other metadata types for my app are being pulled except the reports. Does creating a package affect which components are pulled from the scratch org? My understanding was that I didn't need to create a package with DX. Am I missing something conceptually? – salesforce-hacker Nov 16 '17 at 21:14
  • @sfdcfox You answer does not make sense .Why do one has to package ? The question says in scratch org reports are created and the user wants to pull via force:pull .I think this has nothing to do with namespace as well – Mohith Shrivastava Nov 16 '17 at 23:52
  • @salesforce-hacker I tried yesterday with a new scratch and I was not able to make it pull reports or dashboards. Other approach could be to create unmanaged package with your reports and dashboards in the scratch and pull it with "sfdx force:mdapi:retrieve -s -r ./[targetFolder]-p [packageName] -u [yourScratch] -w 10", but you don't have package manager in Scratch as far as I know. So I assume your only way is to pull it with metadata API. Let us know if you manage to solve it other way. – Andrej Lucansky Nov 17 '17 at 9:16

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.