Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Campaign Activity - ChannelTypeCode

(0) ShareShare
ReportReport
Posted on by

Hello,

We only want Letter and Phone to be available Activity Types for Campaign Activity (channeltypecode). It looks like I am able to remove the other option set values, but I want to be sure I will not be breaking anything by doing so. Has anyone done this before and did you have any issues?

Thanks,

Suzy

*This post is locked for comments

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Campaign Activity - ChannelTypeCode

    Hi Suzi,

    I don't think it will not impact anything  if you can removed the options . It will work as expected like you are not using those remove channel .

    However its always best practice instead of removing options from system field  you can do following -

    - Hide the options  from Channel Type optionset using JavaScript while form onload .

    Try with this -

    function OptionSetAddRemove() {
        var optionSet = Xrm.Page.ui.controls.get("channeltypecode");
        var optionSetValues = optionSet.getAttribute().getOptions(); // retrieve All options of Option set field
        optionSet.clearOptions();
        optionSetValues.forEach(function (element) {       
            if (element.value == "831260008")  // Remove options which you want to hide based on value 
                optionSet.removeOption(element);
    
        });
    }

    -Restrict Campaign activity creation when user select other type of channel using workflow and display custom error message when user wants to create other type of activity channel.

    Please check below reference -

    http://survivingcrm.com/2013/11/using-real-time-workflows-to-show-error-messages/

    Hope this helps .

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans