Changing Record Type Is Clearing Some Fields

  • 2
  • Problem
  • Updated 4 years ago
  • Solved
Hey all (happy thanksgiving to my American friends), 

I am having a strange issue when I change record type on a page. The field editor is tied to the Task Object. 

I have included the RecordTypeId field so I have an editable field on the page. However when I change the record type by editing it inline on the view page, the Status and Priority fields are wiped clean. 

These are fields that are accessible in both record types and the picklist values aren't restricted by record type so baffled as to why a record type change would clear them. 

Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb

Posted 4 years ago

  • 2
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Those are picklists. Each record type has values assigned for each picklist. Make sure the values are part of the other record types. Otherwise, they will be removed.



Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Thanks Pat. 

Yes I have confirmed that all the picklist values are available in both record types. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
You have access to those record types in your profile?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Do you have a workflow or apex changing those values?
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Good question! Thought that could be it but yes the profile has access to both original and target record type. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Javascript on your page?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
I just reproduced it.

<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Task">
   <models>
      <model id="Task" limit="0" query="true" createrowifnonefound="true" sobject="Task" doclone="" type="">
         <fields>
            <field id="Subject"/>
            <field id="CreatedDate"/>
            <field id="Status"/>
            <field id="Priority"/>
            <field id="RecordTypeId"/>
            <field id="RecordType.Name"/>
            <field id="Type"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
   </models>
   <components>
      <pagetitle model="Task">
         <maintitle>
            <template>{{Subject}}</template>
         </maintitle>
         <subtitle>
            <template>{{Model.label}}</template>
         </subtitle>
         <actions>
            <action type="savecancel" window="self"/>
            <action type="multi" label="Reset" window="self">
               <actions>
                  <action type="requeryModel" model="Task" behavior="standard"/>
               </actions>
            </action>
         </actions>
      </pagetitle>
      <basicfieldeditor showsavecancel="false" showheader="true" model="Task" mode="edit" buttonposition="" layout="">
         <columns>
            <column width="50%">
               <sections>
                  <section title="Basics" collapsible="no">
                     <fields>
                        <field id="Subject"/>
                        <field id="Status" valuehalign="" type=""/>
                        <field id="Priority" valuehalign="" type=""/>
                     </fields>
                  </section>
               </sections>
            </column>
            <column width="50%">
               <sections>
                  <section title="System Info" collapsible="no">
                     <fields>
                        <field id="CreatedDate"/>
                        <field id="RecordTypeId"/>
                        <field id="Type"/>
                     </fields>
                  </section>
               </sections>
            </column>
         </columns>
      </basicfieldeditor>
   </components>
   <resources>
      <labels/>
      <css/>
      <javascript/>
   </resources>
</skuidpage>
 
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Hmm, I do have some apex on tasks but nothing that is affecting status and priority, nor are there any custom snippets on my page. 

You did also trigger me to check workflows, as I do have a few updating tasks, but again nothing touching those fields. 

Looked at another way, when I view the task using the normal salesforce layouts, I can change the record type without problem. 

Does suggest there is something local to my Skuid page that is causing the issue? 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Looks like a bug to me.
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Thanks for all your help Pat. Does your reproduction of the issue indicate that there is a Skuid issue at play here, do you think? 
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
OK thanks :) I will await Skuid support then I guess, unless I should report this through different channels (I am new here). 

Thanks again. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Strong indicator for sure.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Thanks for the interaction here Pat and Justin.  The Skuid team has a policy not to investigate bugs when eating thanksgiving dinner.  But we'll take a look at this as soon as we can.  Record types are tricky things. 
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Thanks Rob. I guess I can wait until after dinner ;) 

Happy thanksgiving!
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Justin,  Might you be willing to grant Login Rights to Skuid. We'd like to take a look at this issue.  Here is how you do that. 

Then send an email to "support@skuidify.com"  with your Org ID and the name of this page. 

We'll take a look at what is going on. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
I was able to reproduce it. One of my posts above.
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Thanks Rob I have done so. And thanks Pat for your help. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
yw
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
This will be fixed in the next patch of Skuid, 5.21.6, due out at the end of the week. This patch will be pushed to all orgs that are on the 5.21.x branch --- if you are not on this branch, go to the Skuid Releases and install the "Dreamforce 14" release.
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Great news; thanks Zach. 
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
This was fixed in today's patch release 5.21.6 of Skuid, which is now available on the Skuid releases page and will be pushed to all orgs on 5.21.x during this weekend.