How can I add a new communication option of a Web-type?

Question

We need to add a "LinkedIn" communication option type to the  [Communication options] detail.

I mean, we do not need to add a new "Web" communication option and paste a link to the LinkedIn contact profile, but to add a link which would have the "LinkedIn" name.

Answer

1. In the [Communication option types] lookup, add a new communication option and name it, e.g., "LinkedIn", the Communication type - Web

2. On the LinkedIn record, click "Edit" and find the recordId.

3. In configuration, replace the CommunicationUtils schema by copying the code from the original schema. Add ConfigurationConstants in the dependency as it is in the original.

4. In the replaced schema, update the isWebType() method by adding a recordId (see above) verification block and return true.

function isWebType(communicationType) {
    if (!communicationType) {
        return false;
    }
 
    if (communicationType === "5e4025d7-84cf-43ce-9a90-64a966c34853") {
        return true; /*LinkedIn*/
    }
 
    communicationType = communicationType.value || communicationType;
    return ConfigurationConstants.CommunicationTypes.Web.indexOf(communicationType) !== -1;
}

5. Save the changes, clear the cache, reset the site. As a result, the new LinkedIn communication option will look and will be processed as a link.

Like 0

Like

Share

0 comments
Show all comments