Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection Datatable - Display Custom Metadata Type Records #77

Open
solo-1234 opened this issue Mar 9, 2021 · 6 comments
Open

Collection Datatable - Display Custom Metadata Type Records #77

solo-1234 opened this issue Mar 9, 2021 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed salesforce dependency Custom solve overhead too high, wait on platform legos

Comments

@solo-1234
Copy link
Contributor

I'd like to use CollectionDatatable to display custom metadata records. I use CMDT to store field mappings for some apex code that syncs fields between two objects, and it would be nice to build my own custom UI for managing those.

I would pair it with https://github.com/jongpie/CustomMetadataSaver to actually save new/edited records to the server (since you can't DML them within flow).

Thanks!

@jamessimone
Copy link
Collaborator

cc @jongpie

@tsalb tsalb changed the title CollectionDatatable: display Custom Metadata Type Records Collection Datatable - Display Custom Metadata Type Records Mar 11, 2021
@tsalb tsalb self-assigned this Mar 11, 2021
@tsalb tsalb added the enhancement New feature or request label Mar 11, 2021
@tsalb
Copy link
Owner

tsalb commented Mar 11, 2021

ETA end of mid to end of april, I think

@tsalb
Copy link
Owner

tsalb commented May 4, 2021

New ETA, end of May => June?

@tsalb
Copy link
Owner

tsalb commented Jul 8, 2021

De-prioritizing this as my foreseeable future is pretty slammed. Deferring back to backlog and hopefully someone else can pick up!

@tsalb tsalb removed their assignment Jul 8, 2021
@tsalb
Copy link
Owner

tsalb commented Jul 9, 2021

Per Discord, there is a limitation of LDS (dependency for figuring out columns) on not being able to work against cmdt.

Seems like this is a no go for now, since column attribute reconstruction via apex is off the table (design ethos: keep it lightweight).

@tsalb tsalb added help wanted Extra attention is needed salesforce dependency Custom solve overhead too high, wait on platform legos labels Jul 9, 2021
@jakranz33
Copy link

jakranz33 commented Oct 14, 2021

For what its worth: a rough test allowed me to retrieve Object Info for a CMDT using uiObjectInfoApi. Seems like the salesforce dependency has been since resolved, unless there was a further "gotcha" that I'm missing

The CMDT here is just a sample that happened to be in the org i was testing this in, but seems to work on any CMDT

getCmdInfo.js

import { LightningElement, wire } from 'lwc';
import { getObjectInfo } from 'lightning/uiObjectInfoApi';

export default class GetCmdtInfo extends LightningElement {
    error;
    objectInfo;

    @wire(getObjectInfo, { objectApiName : 'RKQ__Questionnaire_Action__mdt'})
    wiredObjectInfo({ error, data }) {
        if (error) {
            this.error = error;
        } else if (data) {
            this.objectInfo = JSON.stringify(data,null,2);
        }
    }
}

getCmdInfo.html

<template>
    <lightning-card title="Object Info">
        <pre>{objectInfo}</pre>
    </lightning-card>
    <lightning-card title="Error">
        {error}
    </lightning-card>
</template>

Result:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed salesforce dependency Custom solve overhead too high, wait on platform legos
Projects
None yet
Development

No branches or pull requests

4 participants