Select all fields for model

  • 6
  • Idea
  • Updated 2 years ago
  • Under Consideration
In the case that I want more than 50% of an object's fields to be in a model, it would be great to have a "select all fields" option in the model definition.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 6
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yup... 
Photo of sbeauvais34

sbeauvais34

  • 64 Points
I was just looking for a select all option. My primary object has 450 fields.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Would be quite nifty to have this in conjunction with field type filter.
Photo of Vivek Gupta

Vivek Gupta

  • 378 Points 250 badge 2x thumb
Any idea how can we add fields to model dynamically - 

var newModel = new skuid.model.Model();
newModel.fields = [    { id: 'Subject__c' },
    { id: '' },
    { id: 'Client_Contacts__c' },
    { id: 'Approved__c' },
    { id: 'End_Time__c' }];

Now i have an array with all field names say-
var allfields = ["Client__c","Approved__c"];//This array contains all fields

How can we replace  
[    { id: 'Subject__c' },
    { id: 'Client__c' },
    { id: 'Client_Contacts__c' },
    { id: 'Approved__c' },
    { id: 'End_Time__c' }];

with 

allfields.

Any help would be appreciated. thanks!