forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
953 stars 405 forks source link

Editing/Retrieving webLinks, validationRules, EmailTemplates etc. without xml escape characters #2233

Closed kulakovri closed 1 month ago

kulakovri commented 4 years ago

We're moving our org metadata management to SFDX project. Ideally, none of the metadata files supposed to be edited by Salseforce UI.

As an example, we are using Javascript Buttons, and "url" parameter is retrieved in xml following way: {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}

While in salesforce UI those two lines looks like this:

{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}

I get it, that in XML you must escape characters like ', ", <, >, but it is making harder to manage and write the actual code.

Same goes with Validation Rules, Workflows, EmailTemplates and other metadata.

Is there a conventional practice for editing such metadata, besides copy-pasting it using Salesforce UI? Maybe some extensions for vscode and/or salesforce CLI?

smaddox-sf commented 4 years ago

Hi @kulakovri - Thanks for the feedback. There are extensions to work with XML, but I'm not aware of any that disguise the escape characters for you. We don't have any near-term work in this area but may consider it in the future.