Skip to main content

Hi,

I have three models on a page with two of the  models that I am trying to apply actions when a user clicks Save / Update or Save / Close I want fields from one model that a row has already been created and saved on to update fields on the other model with the same field data.  The two models are PaymentPostDeposits and PaymentPostBillingActivity.  When a user collects a payment from someone they enter it as a deposit in our app then later they can apply a portion of that payment to a service line.  What we are trying to do with the button actions is take field data from the PaymentPostDeposits and Update fields on the PaymentPostBillingActivity to match the deposit info so the user does not have to type in the same info twice. The two models refer two two different custom objects in our app. 

Problem: The fields are not updating as I would expect and I have tried several different setups and can't get it to update the fields:


Current Actions in order on page tied to a Save / Update custom button:

Save Models (PaymentPostBillingActivity)

Update a field on rows : (multiple)

PPT2__Payment_Method__c     {{$Model.PaymentPostDeposits.data.0.PPT2__Check_Number__c}}

PPT2__Check_Num__c   {{$Model.PaymentPostDeposits.data.0.PPT2__Card_Holder_First_Name__c}}

PPT2__Card_Holder_First_Name__c    {{$Model.PaymentPostDeposits.data.0.PPT2__Card_Holder_Last_Name__c}}

PPT2__Card_Holder_Last_Name__c    {{$Model.PaymentPostDeposits.data.0.PPT2__Card_Holder_Middle_Initial__c}}

PPT2__Card_Holder_Middle_Initial__c   {{$Model.PaymentPostDeposits.data.0.PPT2__Credit_Card_Authorization__c}}

PPT2__Credit_Authorization_Num__c    {{$Model.PaymentPostDeposits.data.0.PPT2__Payment_Method__c}}

Save Models : All models get saved


Query Models: All models queried (Standard completely replace data)

Thank you,

David.  This sounds very interesting.  I’m not sure I have a silver bullet, but here are some places you should look. 

1. Are you sure there is data in your PaymentPostDeposits  model?   If you type  skuid.$M(‘PaymentPostDeposits’).data  in the console do you get data? Its interesting that you are not doing anything else with that model in your actions. 

2. You might try to take the final Save and Query actions off the sequence to see if the update field actions is doing anything (I assume you have a table of PaymentPostDeposits  records on your page. 

Let me know if any of these help. 


Definitely try Rob’s steps first, check to make sure that the Update Row is doing something before you try to save and re-query, try to remove the save and requery then check your rows.

Another thing to try is to wrap all of the merges in triple-braces, e.g. {{{ }}} rather than just double braces. 


Reply