Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Create new column in AEM cloud inbox which displays workflow initiator name

Avatar

Level 3

Hi,

 

I want to create a new column in AEM cloud inbox. It should display the name of the workflow initiator.

 

Any leads?

 

#AEM

1 Accepted Solution

Avatar

Correct answer by
Level 3

I have implemented the below code and it worked.

import com.adobe.cq.inbox.ui.column.Column;
import com.adobe.cq.inbox.ui.column.provider.ColumnProvider;

import com.adobe.cq.inbox.ui.InboxItem;
import org.osgi.service.component.annotations.Component;


/**
 * This provider does not require any sightly template to be defined.
 * It is used to display the workflow initiator's name as a column in the inbox.
 */
@Component(service = ColumnProvider.class, immediate = true)
public class Inbox implements ColumnProvider {
    @Override
    public Column getColumn() {
        return new Column("initiatorName", "Initiator Name", String.class.getName());
    }

    // Return the workflow initiator's name. Else returns null
    private String getInitiatorName(InboxItem inboxItem) {
        String initiatorName = inboxItem.getWorkflowInitiator();
        return initiatorName;
    }

    @Override
    public Object getValue(InboxItem inboxItem) {
        return getInitiatorName(inboxItem);
    }
}

View solution in original post

7 Replies

Avatar

Community Advisor

@SRC_AEM_DEV : As mentioned in other responses, it may not be recommended to customize it.
However, if this is a must for your requirement, you can refer one of the help article :https://experience-aem.blogspot.com/2019/05/aem-65-extend-inbox-list-view-add-column-path.html

PS: I have not tried these myself.

Avatar

Community Advisor

Hi @SRC_AEM_DEV 

 

It looks like there is an option under admin control to add columns to inbox. Here is the link to the documentation - https://experienceleague.adobe.com/docs/experience-manager-65/content/sites/authoring/essentials/inb...

 

I have not tried this yet. Please have a look and let us know if this works.

 

Thanks

Narendra

Avatar

Administrator

@SRC_AEM_DEV Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni

Avatar

Correct answer by
Level 3

I have implemented the below code and it worked.

import com.adobe.cq.inbox.ui.column.Column;
import com.adobe.cq.inbox.ui.column.provider.ColumnProvider;

import com.adobe.cq.inbox.ui.InboxItem;
import org.osgi.service.component.annotations.Component;


/**
 * This provider does not require any sightly template to be defined.
 * It is used to display the workflow initiator's name as a column in the inbox.
 */
@Component(service = ColumnProvider.class, immediate = true)
public class Inbox implements ColumnProvider {
    @Override
    public Column getColumn() {
        return new Column("initiatorName", "Initiator Name", String.class.getName());
    }

    // Return the workflow initiator's name. Else returns null
    private String getInitiatorName(InboxItem inboxItem) {
        String initiatorName = inboxItem.getWorkflowInitiator();
        return initiatorName;
    }

    @Override
    public Object getValue(InboxItem inboxItem) {
        return getInitiatorName(inboxItem);
    }
}

Avatar

Administrator

@SRC_AEM_DEV I hope the AEM community has been helpful. We look forward to your return as either a learner or a contributor. The community grows with SMEs like you. Invite your AEM peers to contribute too. Happy AEM learning!



Kautuk Sahni