amtrack / sfdx-browserforce-plugin

sfdx plugin for browser automation
MIT License
112 stars 39 forks source link

Unable to update ForecastCategoryName on Opportunity #464

Closed 1ktribble closed 3 years ago

1ktribble commented 3 years ago

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

amtrack commented 3 years ago

@1ktribble Thanks for reporting this issue. I can try to check for a fix/workaround in the next few days.

amtrack commented 3 years ago

@1ktribble I've now enabled Forecasts in my scratch org but I cannot find the New/Reorder/Replace buttons on the Picklist Forecast Category (ForecastCategoryName) in the Object Manager for Opportunity. Please see my screenshots for the Picklists ForecastCategoryName and LeadSource on Opportunity.

ForecastCategoryName LeadSource

Could you please guide me on what I need to do to get these buttons?

Technically it looks like this Picklist is an undocumented StandardValueSet to me.

1ktribble commented 3 years ago

It may have something to do with the 5-value-max limit.

1ktribble commented 3 years ago

It may have something to do with the 5-value-max limit.

Even when I try to delete Omitted, I'm given an error from Salesforce. The only way to update it is using "Edit"

amtrack commented 3 years ago

@1ktribble Hmm, so this would probably require a completely different logic for browser automation compared to the existing logic for handling picklist values. Do you still think this is worth to implement or should we close this ticket?

1ktribble commented 3 years ago

Yeah, it may not need to live here, but I'd love to have a zoom convo with you on how to possibly implement this using puppeteer. Would you be open to that?

amtrack commented 3 years ago

@1ktribble Yes, we can do that. Would you please send me an invite to mr.amtrack@gmail.com for next week (CEST timezone).