Skip to main content

I have a UI only checkbox on the model which is a new record A page. When that’s checked I want to set up notes field 1, 2 and 3 from another model which is a list of records A if that’s the last notes field with a value. I’m trying to make this work using the action on new record model via the params.updates on the checkbox. In the snippet, I make a remote action call to Salesforce since list of records A is used for display now and cannot be modified to handle the complexity of selecting the right notes field. The remote call works, but I cannot seem to call updateData() on the model without saving it first. I don’t want to save the model yet since user will need to fill out other data and might use this checkbox at any point before saving the record. Any suggestions on how to update the fields in the UI only without saving the model?


Would something like this work: skuid.ui.fieldRenderers.TEXTAREA.edit(row.notes__c, ‘test notes’) ;


Hello J,

Try like:

In the field render snippet :
var field = arguments[0],    
value = argumentst1], 
$ = skuid.$;

//Modify field-value to something you need based on your condition

if(your condition = TRUE)
{
value = ‘new Value’ ; //New Value 
}
else
{
value = value;   //Keep it as it is.
}

//Render the field to UI
skuid.ui.fieldRenderersRfield.metadata.displaytype]field.mode;


Hi thanks. This works if I put this on the note field itself. How do I put this on the model action so that when the checkbox is ticked, I can set the value in the note field. So essentially I need to do this dynamically like this:
skuid.ui.fieldRenderers[“TEXTAREA”]“edit”;

This is not working. Error says Unable to get property ‘options’ of undefined or null reference



So how do I call custom rendered on a field dynamically on the model action when there is a change in another field?


J…

I don’t think you can force a field to render in a model action.

Instead, you could put two versions of your field on the page, one with your field renderer and one without, and then conditionally render them based on the value of your checkbox.