Multiple Action Button

  • 2
  • Problem
  • Updated 3 years ago
  • In Progress
I have a button that updates a field on the model of the page title that it is on, then updates a field on a different model with a field value from the model of the page title, then saves both of the models. However I get an error message that says, "Uncaught Error: cannot call methods on button prior to initialization; attempted to call method 'enable'". I only get the error message whenever I have changed the value of the field that populating a field on a different model. However, if I triple click the button, the actions all go through. I've tried saving the model of the page title first and then updating the other model with the value, but that hasn't worked either. It just saves the model and doesn't do any of the other actions. Any ideas of what is going on? 

Photo of Nate Gilbertson

Nate Gilbertson

  • 1,194 Points 1k badge 2x thumb

Posted 3 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
A few questions. 

1. What version of Skuid are you running. 
2. Can you post more specifically the action sequence you are running.  Maybe even the xml.

We'll get this figured out.  
Photo of Nate Gilbertson

Nate Gilbertson

  • 1,194 Points 1k badge 2x thumb
I'm running Skuid 6.8.7 in UAT and here is the XML for the button that I am trying to execute. Also, the Reader1 model is a child object of the model Applicant.

<action type="multi" label="Hold">
                                       <actions>
                                          <action type="updateRow" fieldmodel="Reader1" field="reader_status__c" enclosevalueinquotes="true" value="Hold"/>
                                          <action type="updateRow" fieldmodel="Applicant" field="reader_1_recommended_decision__c" enclosevalueinquotes="true" value="{{recommended_decision_rating__c}}"/>
                                          <action type="save">
                                             <models>
                                                <model>Reader1</model>
                                                <model>Applicant</model>
                                                <model>Reader</model>
                                             </models>
                                          </action>
                                       </actions>
                                    </action>
                                 </actions>
                                 <renderconditions logictype="and">
                                    <rendercondition type="fieldvalue" operator="does not contain" enclosevalueinquotes="true" fieldmodel="Reader1" sourcetype="fieldvalue" nosourcerowbehavior="deactivate" field="reader_status__c" value="finished"/>
                                 </renderconditions>
Photo of Nate Gilbertson

Nate Gilbertson

  • 1,194 Points 1k badge 2x thumb
Hi Rob,

Any idea what might be going on?
Photo of Nate Gilbertson

Nate Gilbertson

  • 1,194 Points 1k badge 2x thumb
Hi Rob,

I just wanted to check in and see if you might have an update. I've tried a few different things and I still can't get it to work. Any advice would be helpful.

Thank you!