sfpowerkit icon indicating copy to clipboard operation
sfpowerkit copied to clipboard

Patching package picklists for packages with multiple words throwing error

Open 1ktribble opened this issue 2 years ago • 1 comments

Describe the bug

When attempting to generate a static resource using the picklist patch command, the filenames are including spaces in the paths (because filepaths are being generated based on package name, not package path). Salesforce can no longer deploy static resources with spaces in them.

Screen Shot 2022-09-06 at 2 40 59 PM

To Reproduce Steps to reproduce the behavior:

  1. sfdx sfpowerkit:source:picklist:generatepatch -p "$packageLabel"

Expected behavior

A deployable static resource is generated. e.g. Package A creates the zip file and metadata file as:

Package_A_picklist.resource-meta.xml
Package_A_picklist.zip

instead of:

Package A_picklist.resource-meta.xml
Package A_picklist.zip

Screenshots See screenshot above for Salesforce mdapi error.

Desktop (please complete the following information):

  • OS: [e.g. Windows/Linux] - MacOS and Linux
  • Node Version - 16.16.0
  • Version of sfpowerkit[e.g 1.45.0] - latest
  • Salesforce Org Version [ In case of pre release window ] - Winter '22

Additional context [Add any other context about the problem here.]

If this line and the following command that creates the static resource would use the path instead of the package name, there's no need to do regex whitespace replacement.

(https://github.com/dxatscale/sfpowerkit/blob/7886c4431fa9369064667a44759889c634584365/src/commands/sfpowerkit/source/picklist/generatepatch.ts#L224)

1ktribble avatar Sep 06 '22 18:09 1ktribble

Thanks @1ktribble I will add this to the fixes for September release.

Caitlyn

Caitlyn-Mills avatar Sep 07 '22 09:09 Caitlyn-Mills