Giter Club home page Giter Club logo

sfdx-browserforce-plugin's People

Contributors

aly76 avatar amtrack avatar crkelley avatar dependabot[bot] avatar gavinhughpalmer avatar gulp-cm avatar jonathankretzmer avatar jverelst avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sfdx-browserforce-plugin's Issues

Automate Granting "Service Presence Status Access" (Omni-Channel)

By default, Salesforce does not provide an ability to deploy access entries and in scratch, org users do not have access to Presence Statuses. The only one available is "Offline". It blocks running standard testing and running e2e tests as a real service agent by accepting cases, etc.

Idea: https://ideas.salesforce.com/s/idea/a0B8W00000Gdq3UUAR/add-service-presence-statuses-access-to-metadata-api

As mentioned in the DX@Scale Slack thread, it is worth adding this automation to Browserforce - https://dxatscale.slack.com/archives/CN9N54GF5/p1684482930346419

Please clarify possible flags for the commands

Some of the flags are unclear in the commands. For instance, sfdx browserforce:plan --help mentions:

  • -f for the definition file, which I think is more relevant for sfdx browserforce:apply command where a definition file should already exist.
  • -s flag for the state file, what does the state file accomplish?
  • and the single example has a -o flag, perhaps it's a typo.

Automate "Match Production Licenses" in Sandboxes

Problem statement

After acquiring or changing Salesforce licenses these initially are available only in the production org. To enable new or changed licenses in a sandbox requires to go into the sandbox, navigate to the Company Information page and to press the "Match Production Licenses" button. When using a complex sandbox setup (think DEV+TEST+QA+PREPROD+TRAINING and maybe a second parallel track for application maintenance or multiple/many DEV sandboxes) this can easily lead to sandboxes being forgotten and still working with outdated licenses. This could lead not only to operational problems (due to limits) but also to deployment problems when required licenses are not available in a sandbox.

Feature Request

Provide a command to automate clicking the "Match Production Licenses" button in a sandbox. This would allow to make this process more efficient, this could be scripted and hence would be less prone to human error.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Add Delegated Administration?

Delegated Administration groups is one of the most difficult things for us to consistently manage across environments, and it is crucial for user experience. Is there a way to add Delegated Adminstration to this?

HVS Enablement

Would it be possible to activate the HVS setting within this plugin? Currently, in a scratch org definition file, you can only define the license itself, however, the actual feature doesn't get enabled.

https://help.salesforce.com/articleView?id=hvs_considerations.htm&type=5
"High Velocity Sales can be deployed in scratch orgs, but the settings for the feature can’t be updated through the scratch org definition file. Instead, configure settings directly in the High Velocity Sales app."

Especially in a CI / CD flow that would be great!

Add/Update picklist values

UPDATE 12/5/21

The picklist plugin currently supports deletion, activation/deactivation and 'find and replace'. It would be useful to be able to add and update picklist values, as there have been cases where the Metadata API fails to add/update values (e.g. ContractStatus) and the only workaround is browser automation or manual intervention.


We're trying to replace picklist values in the ContractStatus standard value set, but keep getting "no action necessary" as an output. Is there something we are missing?

Plugin version: 2.5.6
SFDX CLI: 7.99.0
salesforcedx: 51.0.0
Chromium: 91.0.4469.0 (Developer Build) (x86_64)

To replicate:

$ sfdx browserforce:apply -f definition-file.json -u scratchorg
logging in... done
Applying definition file definition-file.json to org scratchorg
[Picklists] retrieving state... done
[Picklists] no action necessary
logging out... done
# definition-file.json
{
    "$schema": "https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/master/src/plugins/schema.json",
    "settings": {
      "picklists": {
        "picklistValues": [
          {
            "metadataType": "StandardValueSet",
            "metadataFullName": "ContractStatus",
            "value": "In Approval Process",
            "newValue": "Pre Creation"
          },
          {
            "metadataType": "StandardValueSet",
            "metadataFullName": "ContractStatus",
            "value": "Draft",
            "newValue": "Queued"
          },
          {
            "metadataType": "StandardValueSet",
            "metadataFullName": "ContractStatus",
            "value": "Activated",
            "absent": false
          }
        ]
      }
    }
}

l

Writing a new plugin, struggling with the e2e tests

We need to be able to set the Org currency as the scratch org default, based on our hosting location, defaults to Ireland Euro. So I have created a plugin allowing changing fields on the Company Information section in Setup.

I am struggling with the last part of executing my e2e mocha tests.

When running the command
npm run test:e2e -- --grep "CompanyInformation"
it correctly finds and executes the tests in my file, but comes back with errors.

CompanyInformation
       should change currency to "English (Ireland) - EUR":
     TypeError: Cannot read properties of null (reading 'toString')
      at Context.<anonymous> (src\plugins\company-information\index.e2e-spec.ts:34:58)
      at processImmediate (node:internal/timers:476:21)

The .status and .output from the spawnSync are null.

Would appreciate pointing me in the right direction to finalise this.

Thanks.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/default.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/preview.yml
  • actions/checkout v4
  • actions/setup-node v4
nodenv
.node-version
  • node 20
npm
package.json
  • @mdapi-issues/listmetadata-standardvalueset 2.0.3
  • @salesforce/sf-plugins-core 4.1.1
  • p-retry 4.6.2
  • puppeteer 21.5.1
  • @salesforce/dev-config 4.1.0
  • @salesforce/prettier-config 0.0.3
  • @types/mocha 10.0.4
  • @types/node 20.9.0
  • mocha 10.2.0
  • nyc 15.1.0
  • oclif 4.0.3
  • prettier 3.1.0
  • ts-node 10.9.1
  • typescript 5.2.2
  • node >=14.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Error adding picklist value

I am trying to add a picklist value and get the following error message:

ERROR running browserforce:apply:  The "url" argument must be of type string. Received undefined

I don't understand which "url" argument the error message is talking about, or what I can do to prevent the problem.

To reproduce, use the following files:

sfdx-project.json

{
  "namespace": "",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sourceApiVersion": "52.0"
}

config/project-scratch-def.json

{
  "country": "US",
  "edition": "Developer",
  "settings": {
    "lightningExperienceSettings": {
      "enableS1DesktopEnabled": true
    }
  },
  "orgName": "Test",
  "adminEmail": "[email protected]"
}

config/project-scratch-browserforce.json

{
    "$schema": "https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/master/src/plugins/schema.json",
    "settings": {
        "security": {
            "loginAccessPolicies": {
                "administratorsCanLogInAsAnyUser": true
            }
        },
        "picklists": {
            "picklistValues": [{
                    "metadataType": "StandardValueSet",
                    "metadataFullName": "ForecastCategoryName",
                    "value": "Most Likely",
                    "newValue": "Most Likely",
                    "active": true
                }
            ]
        }
    }
}

With these files, run the following commands:

$ sfdx force:org:create -s -a scratch -f config/project-scratch-def.json --wait 10
(node:11429) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
Successfully created scratch org: 00D1j000000EP2uECG, username: [email protected]
$ sfdx force:config:set defaultusername=scratch
=== Set Config
Name             Value    Success
───────────────  ───────  ───────
defaultusername  scratch  true
$ sfdx browserforce:apply -f config/project-scratch-browserforce.json --targetusername scratch
logging in... done
Applying definition file config/project-scratch-browserforce.json to org [email protected]
[Security] retrieving state... done
[Security] no action necessary
[Picklists] retrieving state... failed
ERROR running browserforce:apply:  The "url" argument must be of type string. Received undefined
logging out... done
$ 

Notice how the security action seems to run fine, whereas the picklist action doesn't.

Add a new Organization-Wide Address

Is it feasible for this to be added as a plugin?

Since it's unavailable via metadata API it'd be great to be able to create one post scratch org create.

Path: lightning/setup/OrgWideEmailAddresses/home

Topic: Plugin Development

Hey @amtrack!

Quick question.. I have some unique use cases that I want to automate by applying browserforce. Given these are not as generic as the provided commands here, it is not a good idea to have them public really. How can we port our own settings into your plugin? Only way is to fork the repo and work on our own unique version?

Cheers

Issue contributing Opportunity Split enablement

I have a use case where I would like to create Scratch Orgs with Opportunity Splits already enabled. I have attempted to follow your instructions in CONTRIBUTING.md. I seem to be having an issue when it comes to trying it out. The suggested command:
./bin/run browserforce:apply -f src/plugins/opportunity-splits/enable.json
results in:

Could not find plugin named 'opportunitySplits' in definition: {"$schema":"../schema.json","settings":{"opportunitySplits":{"enabled":true}}}

I did the yarn command and followed your instructions carefully, so I'm not certain what could be missing.

Unable to update ForecastCategoryName on Opportunity

With the standardvaluesets feature enabled, there still doesn't seem to be support for updating the ForecastCategoryName field. Below is my config file. I've tried multiple ways:

    "$schema": "../schema.json",
    "settings": {
        "picklists": {
            "picklistValues": [
              {
                "metadataType": "CustomField",
                "metadataFullName": "Opportunity.ForecastCategoryName",
                "value": "Omitted",
                "newValue": "Lost"
              }
            ]
        }
    }
  }

output:
[Picklists] retrieving state... failed ERROR running browserforce:apply: Cannot read property 'id' of undefined

    "$schema": "../schema.json",
    "settings": {
        "picklists": {
            "picklistValues": [
              {
                "metadataType": "StandardValueSet",
                "metadataFullName": "ForecastCategoryName",
                "value": "Omitted",
                "newValue": "Lost"
              }
            ]
        }
    }
 }

output:
[Picklists] retrieving state... failed ERROR running browserforce:apply: The "url" argument must be of type string. Received undefined

Automate "Empty Org Recycle Bin"

Problem Statement

In our Salesforce org, frequently large number of records get deleted and then are kept in the Recycle Bin for a while. This negatively affects the performance of our reports and dashboards (according to Salesforce Support). Recommendation from Salesforce Support was to frequently empty the recycle bin if these records are no candidates to be undeleted. We currently have no known way of automating this.

Feature Request

Provide a capability to automatically navigate to the Recycle Bin in LEX /lightning/o/DeleteEvent/home and press the "Empty Org Recycle Bin" button and automatically confirm the following question.

Ability to use different browser for execution

Hi, would it be possible to add an environment variable to allow users to specify an existing browser to run instead of using Chromium which is packaged with puppeteer?
We have strict access controls on our enterprise laptops where only whitelisted applications can be run, and unfortunately Chromium isn't one of them. I am able to edit the code in browserforce.js to launch my existing Chrome install instead.

SF to SF Setting Not Activated

Hey @amtrack

I've been using "SF to SF activation" when spinning up a new scratch in my CI/CD pipeline. It used to work well, but it started to fail.

In the logs, it never complains: Always getting this success message:

[SalesforceToSalesforce] retrieving state... done
[SalesforceToSalesforce] changing 'enabled' to 'true'... done

However, when trying to push my code which has a dependency on the PartnerNetworkRecordConnection object (which is only available once you activate the SF to SF feature in the target org) it fails saying the object doesn't exist.

And when I go manually check if the feature gets activated in the org, it is not. Apparently something wrong happens behind the scenes. So wanted to raise this as you could debug and tackle maybe?

Cannot read property 'Id' of undefined error

Hi there,

I am looking into this plugin to import password protected JKS cert into a scratch org. I could turn on the Identity Provider but failed to import the cert.

I get "Cannot read property 'Id' of undefined". This is the config json.

Any input please?

{
"$schema": "https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/v1.2.0/src/plugins/schema.json",
"settings": {
"security": {
"certificateAndKeyManagement": {
"importFromKeystore": [
{
"filePath": "./data/config/certificates/google_cloud.jks",
"name": "google_cloud",
"password": "*****************"
}
]
}
}
}
}

Support for "LinkedIn Sales Navigator"

Hi,

Tried looking back and forth the Metadata API docs, scratch org settings and browserforce supported settings in the JSON schema but didn't find any traces of "LinkedIn Sales Navigator" anywhere

Seems like it has 2 types of packages, one "legacy" managed package and one native baked straight in SF by default, which got recently implemented I believe, and searching for keywords in how to enable it programmatically leads to nowhere. I'm talking about this:
image

Seems like it needs to be enabled manually the same way as the Sales Engagement settings (#375)

If anyone got any clues, please feel free to rescue me out 😭

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.