Related list missing from Record

Damian Martinez
Mega Sage

Hello everyone,
I created a new table for project tasks U_project based on the task table.
I'm trying to add a related list, in this case Emails but it is not available.
For cases table it is available and I can add it, see screenshot:
find_real_file.png

Does somebody know why it is not available for my new table/records?

Thanks!

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

There is no OOB relationship between task and Emails table. On Case table the related list is added by creating relationship.

If you want same for your custom table then you need to create one relationship like below.

 1. Search for Relationships in left Navigation.

find_real_file.png

 

Create same relationship for your table:

find_real_file.png

 

Once you create this relationship then try to add Related list on your custom table, it will show Emails related list.

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

4 REPLIES 4

Anil Lande
Kilo Patron

Hi,

There is no OOB relationship between task and Emails table. On Case table the related list is added by creating relationship.

If you want same for your custom table then you need to create one relationship like below.

 1. Search for Relationships in left Navigation.

find_real_file.png

 

Create same relationship for your table:

find_real_file.png

 

Once you create this relationship then try to add Related list on your custom table, it will show Emails related list.

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hello @Anil Lande,
Thanks so much for your fast reply, that worked! I added the email related list.
However one last thing, the compose email UI action is missing see screenshot:
find_real_file.png

For case record it is showing:
find_real_file.png

I checked UI actions and saw that there is a Composed Email for Global table so I clone this one but change the table to the new project table but it did not make a difference, do you know what else I could be missing here?

find_real_file.png

 

This is the code from the Workspace Client Script:

function onClick(g_form) {
    var LEGACY_EMAIL_CLIENT_NAME = 'sn-email-editor',
        SEISMIC_EMAIL_CLIENT_NAME = 'sn-email-client-wrapper',
        EMAIL = 'sys_email',
        DRAFT = 'sys_email_draft',
        tValue = DRAFT;

    //get the list of renderers
    var renderers = [];
    if (ux_globals && ux_globals.presource['sn-workspace-content:snCustomRenderer']) {
        renderers = ux_globals.presource['sn-workspace-content:snCustomRenderer'].data.GlideRecord_Query.sys_aw_renderer._results;
    }

    if (renderers.length > 0) {
        // Filter out Email renderers
        var renderMap = {};
        renderers.filter(function(o) {
            return o.table.value == EMAIL || o.table.value == DRAFT;
        }).map(function(o) {
            renderMap[o.table.value] = o.custom_renderer_tag.value;
        });

        //Figure out the final value
        if (!renderMap.hasOwnProperty(DRAFT))
            tValue = EMAIL;
        else {
            if (!renderMap.hasOwnProperty(EMAIL))
                tValue = DRAFT;
            else if (renderMap[EMAIL] == LEGACY_EMAIL_CLIENT_NAME)
                tValue = EMAIL;
        }
    }
    
    var dirtyFieldList = g_form.serialize(true).map(function(field) {
        return {
            field: field.name,
            value: field.value
        };
    });
    g_aw.openRecord(tValue, '-1', {parentTable: g_form.getTableName(), parentSysId: g_form.getSysId(), headerValue: getMessage("New Email"), dirtyFields: dirtyFieldList});
}

 

Maybe I have to change something in the code?

Thanks.

 

 

 

 

 

Hello @Anil Lande,
I finally added the compose email button to the form:

find_real_file.png

In the new UI Action I copied I removed the condition:

new EmailEditorUtil().showInWorkspaceFormMenu(current)

Not sure why removing this condition is making the compose button appear on the form.
Thanks.

hi pls i have a question can i edit this script (    g_aw.openRecord(tValue, '-1', {parentTable: g_form.getTableName(), parentSysId: g_form.getSysId(), headerValue: getMessage("New Email"), dirtyFields: dirtyFieldList});)
to set a value for the body as well ?