Editable Grid - Record Types - Add Row

Certified Senior Developer

I was working to add a row in an editable grid that uses record types. I kept getting errors with indexing when I tried to use append in the add row link. I found a solution by saving a value into the list as shown:

This seems hacky, but it works. Does anyone know of an easier or better way to do this?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    ),
    addRowlink: a!dynamicLink(
    label: "Add Group",
    value:'recordType!{c2131273-7291-4303-b11b-4d502c0de3e7}Component Function'('recordType!{c2131273-7291-4303-b11b-4d502c0de3e7}Component Function.fields.{18b9f077-d7fb-4d68-8b32-4575923a26c0}modelComponentFunctionId':-1),
    saveInto: {
    a!save(
    ri!componentFunction,
    append(ri!componentFunction,save!value)
    )
    }
    ),

    append should work the same way as a normal CDT type variable just make sure the value you are trying to append is created correctly using recordType!ABC( id:1) 

Reply
  • 0
    Certified Lead Developer

    ),
    addRowlink: a!dynamicLink(
    label: "Add Group",
    value:'recordType!{c2131273-7291-4303-b11b-4d502c0de3e7}Component Function'('recordType!{c2131273-7291-4303-b11b-4d502c0de3e7}Component Function.fields.{18b9f077-d7fb-4d68-8b32-4575923a26c0}modelComponentFunctionId':-1),
    saveInto: {
    a!save(
    ri!componentFunction,
    append(ri!componentFunction,save!value)
    )
    }
    ),

    append should work the same way as a normal CDT type variable just make sure the value you are trying to append is created correctly using recordType!ABC( id:1) 

Children
No Data