Update lookup field on row to null via row action

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I'm trying to null out a lookup field on row using a row action but it's not working.  Any ideas?

<action type="multi" label="Remove Property" icon="ui-silk-basket-delete">    <actions>
        <action type="updateRow" fieldmodel="Domains" field="Opportunity__c" enclosevalueinquotes="true" value=""/>
    </actions>
</action>
Photo of Will Soupcoff

Will Soupcoff

  • 734 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Will...I am not sure why your row action 'as-is' does not work.  I was able to do this declaratively by creating a second model that I do not load on page load nor create a new row for.  This is an empty model (you'll see Skuid reference this as a 'proto' model).  I selected the Id field that I want to update (in my case AccountId).  In my row action I set the value of the lookup field to the Id from my 'empty' model.  Since I have not loaded any data into the model, this Id field is empty/null.  It does clear the lookup field.  Here are some screen shots.


Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Pat Vachon has also pioneered a solution here.  Create a UI only field called "Blank"  its default value should be blank.  Then pass the value of this field into your lookup field in your action framework step.   

https://community.skuidify.com/skuid/topics/cannot-empty-the-value-of-a-lookup-through-the-action-fr...
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Nice!  Thanks!