Skip to main content
December 15, 2022
Question

Convert List Of Maps To Record Type

  • December 15, 2022
  • 3 replies
  • 0 views

I am trying to use record type's export to excel feature for that I need to convert my data which is in list of maps (image below) to record type.

Please hep me with it.

    3 replies

    stefanhelzle0001
    Brainy
    December 15, 2022
    December 16, 2022

    I did try this approach, but getting this error message 

    CastInvalid : Could not cast from List of Map to <Record Type>

    When I try to cast one item from List of Map it casts successfully but the returned object is not a record type. Its a simple CDT type object hence I am not able to use it in gridField() it gives me this error message.

    A grid component [label="Grid"] has an invalid value for "showSearchBox". "userFilters" and "showSearchBox" may only be specified when "data" is sourced from a Record Type.

    stefanhelzle0001
    Brainy
    December 16, 2022

    This works for me: