Giter Club home page Giter Club logo

Comments (6)

Raptor399 avatar Raptor399 commented on June 11, 2024 1

Excellent! Can confirm this works on my end as well. Thank you for investigating!

from sfdx-browserforce-plugin.

github-actions avatar github-actions commented on June 11, 2024

🎉 This issue has been resolved in version 2.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from sfdx-browserforce-plugin.

amtrack avatar amtrack commented on June 11, 2024

@Raptor399 Thanks for you report!

I wasn't aware of the StandardValueSet ForecastCategoryName and so there was no mapping entry yet.
I've now added one in the latest release.

Please note that you'll have to provide statusCategory (instead of value):

        {
          "metadataType": "StandardValueSet",
          "metadataFullName": "ForecastCategoryName",
          "newValue": "Most Likely",
          "statusCategory": "Most Likely",
          "active": true
        }

P.S.: Unfortunately it's difficult to keep track of available StandardValueSets.
If you know some other resource/API to list all available StandardValueSets, please let me know.
I'm only aware of https://developer.salesforce.com/docs/atlas.en-us.234.0.api_meta.meta/api_meta/standardvalueset_names.htm where ForecastCategoryName is not listed.

from sfdx-browserforce-plugin.

Raptor399 avatar Raptor399 commented on June 11, 2024

Thank you for the update and the correction, @amtrack !

I'm getting an error when trying to apply the modified project-scratch-browserforce.json to a new test org, though? This is what I get:

$ sfdx plugins       
sfdx-browserforce-plugin 2.8.0
$ 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... done
[Picklists] changing 'picklistValues' to '[{"metadataType":"StandardValueSet","metadataFullName":"ForecastCategoryName","newValue":"Most Likely","statusCategory":"Most Likely","active":true}]'... failed
ERROR running browserforce:apply:  waiting for XPath `//tr[td[2][text() = "undefined"]]//td[1]//a[contains(@href, "/setup/ui/picklist_masteractivate.jsp")]` failed: timeout 30000ms exceeded
logging out... done

from sfdx-browserforce-plugin.

amtrack avatar amtrack commented on June 11, 2024

@Raptor399 OK, I'm able to reproduce this. Will look into it.

from sfdx-browserforce-plugin.

amtrack avatar amtrack commented on June 11, 2024

@Raptor399 Sorry for the wrong config I provided last time! The active property should be omitted.
When adding a new picklist palue, it is set active by default. So there is no need to provide the active property.
The code actually interprets a given active property as instruction to enable/disable an existing picklist value.

I've tried the following config, and it seems to work now:

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",
          "newValue": "Most Likely",
          "statusCategory": "Most Likely"
        }
      ]
    }
  }
}
$ sfdx browserforce:apply -f config/project-scratch-browserforce.json
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... done
[Picklists] changing 'picklistValues' to '[{"metadataType":"StandardValueSet","metadataFullName":"ForecastCategoryName","statusCategory":"Most Likely","newValue":"Most Likely"}]'... done
logging out... done

$ sfdx browserforce:apply -f config/project-scratch-browserforce.json
logging in... done
Applying definition file config/project-scratch-browserforce.json to org [email protected]
[Security] retrieving state... done
[Security] changing 'loginAccessPolicies' to '{"administratorsCanLogInAsAnyUser":true}'... done
[Picklists] retrieving state... done
[Picklists] no action necessary
logging out... done

from sfdx-browserforce-plugin.

Related Issues (20)

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.