Possible bug with metadata override

  • 1
  • Problem
  • Updated 2 years ago
  • Not a Problem
Greetings,

A few months ago (April I believe) we had created a custom mass update due to an issue we were having with a field dependent picklist. In the the pop up we created for this (with a field editor of the same sObject type of the records we want to update, using a template model for the field editor), we have a checkbox field where we override the metadata to make it a picklist instead, with two values. When we update the selected records we check to see if any of the fields are blank, or has a value of "New Value" and update the selected fields with those fields that have been changed on the template record.

This worked great until we upgraded to Rockaway. Prior to the upgrade, the checkbox field that I mentioned above had a "-- None --" option for the picklist as desired. But afterwards this option disappeared, which caused some problems (not game stopping) in production.

The solution I found for this problem was to edit the XML directly and add 'defaultValue="New Value"' to that field that we were trying to override the metadata. This has fixed our problem, but I was just wondering if this is a bug or the metadata override is working as intended.
Photo of John Freese

John Freese

  • 542 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
John~

We are having difficulty reproducing the problem you are seeing. Can you include screenshots of what's happening or do a quick sample page using standard Salesforce fields and paste the XML here for us to see what's going on? 

Thanks!
Karen
Photo of John Freese

John Freese

  • 542 Points 500 badge 2x thumb
Hi Karen,

When I made a sample page (under Rockaway) and overrode the metadata, it worked just fine.

Here is the template model we're using for the mass update:

<model id="TenorMassUpdate" limit="1" query="false" createrowifnonefound="false" adapter="" type="" sobject="Tenor__c" doclone="">
            <fields>
                <field id="End_Pricing__c"/>
                <field id="Opportunity_Start_Date__c"/>
                <field id="Billing_Point__c"/>
                <field id="Include_GRT__c" overridemetadata="true" ogdisplaytype="BOOLEAN" displaytype="PICKLIST">
                    <picklistentries>
                        <entry value="true" label="Include"/>
                        <entry value="false" label="Exclude"/>
                    </picklistentries>
                </field>
                <field id="Commission_For_Primary_Campaign__c"/>
                <field id="Commission_For_Secondary_Campaign__c"/>
                <field id="Commission_For_Tertiary_Campaign__c"/>
                <field id="PricingProduct" uionly="true" displaytype="REFERENCE" label="Product" targetobjects="Pricing_Product__c"/>
                <field id="BillType" uionly="true" displaytype="PICKLIST" label="Bill Type" defaultValue="New Entry">
                    <picklistentries>
                        <entry value="Single Bill" label="Single Bill"/>
                        <entry value="Dual Bill" label="Dual Bill"/>
                    </picklistentries>
                </field>
                <field id="Billing_Point_Commodity__c"/>
                <field id="PricingMargin" uionly="true" displaytype="DOUBLE" label="PRE Margin" precision="9" scale="6"/>
                <field id="IncludeSUT" uionly="true" displaytype="PICKLIST" label="Sales/Use Tax">
                    <picklistentries>
                        <entry value="SUT not Included" label="SUT not Included"/>
                        <entry value="SUT Included" label="SUT Included"/>
                    </picklistentries>
                </field>
            </fields>
            <conditions/>
            <actions/>
        </model>
The issue we're having is with the Include_GRT__c field. This was created under Bonzai, and is the only instance we've seen this problem. I removed the defaultValue bit from it to show how it looks with the problem; adding defaultValue="New Entry" resolves the issue. Here's a screen cap of the popup:



All of the other picklists are working as intended.
(Edited)
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
John~

The override metadata is working as intended, as evidenced by it working on the simple sample page you created and I am able to see the None option by following the XML you have above for your Include_GRT__c field. Sorry, but something else seems to be breaking your mass update process. 

Thanks!
Karen