web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Bypass Phone Call Quick Create Form

(0) ShareShare
ReportReport
Posted on by 90

We have integrated our phone system with D365 and it automatically creates a phone call activity.  I would like to disable the Phone Call Quick Create Form.  How would I do that?  Thanks!

I have the same question (0)
  • Suggested answer
    cloflyMao Profile Picture
    25,210 on at

    Hi DawnK,

    You can go to Advanced Settings > Customizations > Customize the system > Entities > Phone Call to disable its quick create option, then save and publish the modified entity.

    0624.pastedimage1610069331125v1.png

    After that it will open phone call main form instead of quick create form when you add phone call activity from contact's timeline.

    Regards,

    Clofly

  • DawnK Profile Picture
    90 on at

    Thanks but I do not want any Phone Call form to open because the integration automatically

    creates a phone activity.  

    I am looking for the way to stop the phone call form to open when I click on the phone icon.

  • cloflyMao Profile Picture
    25,210 on at

    Hi DawnK,

    Please check whether the solution would work for you:

    Firstly we still need to disable the quick creation feature of phone call.

    Then, due to form has different types, so we can run custom javascript function at OnLoad event of Phone Call form to lock all fields when the form type is "Create":

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-ui/getformtype 

    function disableCreate(executionContext) {
        var formContext = executionContext.getFormContext();
        var formType = formContext.ui.getFormType();
        if (formType === 1) {
    
            formContext.ui.controls.forEach(function (control, index) {
    
                var controlType = control.getControlType();
    
                if (controlType != "iframe" && controlType != "webresource" && controlType != "subgrid") {
    
                    control.setDisabled(true);
    
                }
    
            });
    
            var confirmStrings = { text: "Phone call creation is disabled.", title: "Confirmation Dialog" };
            var confirmOptions = { width: 450, height: 200 };
            Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
                function (success) {
                    if (success.confirmed)
                        console.log("");
                    else
                        console.log("");
                });
        }
    }

    e.g: After clicking the phone icon, user will navigate to phone call form, but with the code, it will show a confirmation dialog.

    pastedimage1610344751302v1.png

    All fields will be locked even if we close the dialog.

    pastedimage1610344892432v2.png

    In addition, from my test, it seems that we can still save form even if all fields are locked and required field such as subject is blank, so please register another function at OnSave event of the form to prevent saving event.

    function stopSave(executionContext) {
        var formContext = executionContext.getFormContext();
        var formType = formContext.ui.getFormType();
        if (formType === 1) {
            var subject = formContext.getAttribute("subject").getValue();
            if (subject === null) {
                var eventArgs = executionContext.getEventArgs();
                eventArgs.preventDefault();
                
                var confirmStrings = { text: "You can't save phone call with empty subject.", title: "Confirmation Dialog" };
                var confirmOptions = { width: 450, height: 200 };
                Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
                    function (success) {
                        if (success.confirmed)
                            console.log("");
                        else
                            console.log("");
                    });
            }
        }
    }

    pastedimage1610347029804v1.png

    Regards,

    Clofly

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    Thank you for your query.

    Depending on your need, you can opt one of these approaches:

    1 - You can set the Phone Call as read-only in the Entity Configuration. However, this way user can't create or edit the phone call (they can only see it in read-only mode). 

    Here are steps to follow:

    • Go to Advanced Settings -> Customizations -> Customize the System.
    • Expand Entities -> Phone Call.
    • Under Outlook and Mobile section, check Read-only in Unified Client option.
    • Click and Save icon and then Publish.

    pastedimage1610356349367v1.png

    • Refresh the form, now you won't see Phone Call create option.

    pastedimage1610356396350v2.png

    I guess, phone calls will be already completed in your scenario, hence users do not need to edit the Phone Call records.

    If you still think, they should edit:

    2 - Add a script on the Phone Call form to make it read-only (as suggested by Clofly) when form type is Create.

    3 - Or you can create a real-time workflow to prevent Phone Call creation. If your phone call records are create by a specific user (integration user), you can add a condition to stop creation if the user is not integration user.

    For example:

    • Create a real-time workflow on the Phone Call entity.
    • Trigger it on Create.
    • Set the following condition and stop workflow as cancelled:

    pastedimage1610357537896v1.png

  • Community Member Profile Picture
    on at

    Hello Wahaj,

    Risking being wrong by making an assumption, I think you misunderstand. I seem to have the same problem, namely the automatic creation when the Click to Call button is pressed. For me, I would like to click on the button to start our phone system with the number in CRM, but stay on the form on which the field is ( so no quick create form, or switch to a main form of the Telephone table/entity).

    Can you, or anybody help with this problem?

    Kind regards,

    Peter

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    As far as I know, you cannot stop this new phone form.

    Here is a similar thread:

    https://community.dynamics.com/365/f/dynamics-365-general-forum/370172/disable-new-phone-call-form-after-pressing-click-to-call-button

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    I found a solution, it's a bit of a hack but works.

    So we know, we cannot stop launching the Phone Quick Create form, however, we can force close it when launched from Click-to-Call.

    Luckily, a query string parameter is passed named contactinfo which starts with 'tel:<phone number'. 

    Now, all we have to do is register an onLoad function on the Phone Quick Create to close the form when launched using Click-to-Call.

    Here is the code:

    function phOnLoad(executionConext) {
    
        var formContext = executionConext.getFormContext();
    
        var formType = formContext.ui.getFormType();
    
        if (formType != 1) { // If not Create, optional check as form is Quick Create
            
            return;
    
        }
        
    
        var params = Xrm.Utility.getGlobalContext().getQueryStringParameters();
    
        var contactinfo = params.contactinfo;
        
        if (contactinfo != null  && contactinfo != undefined
            && contactinfo.startsWith("tel:")) {
        
            // If Form is opened from TEL protocol, close the form forcefully.
            formContext.ui.close();
            
        }
    
    }

    Please see my blogpost for detailed steps and explanation:

    https://crmlogs.wordpress.com/2021/02/09/dynamics-365-ce-click-to-call-prevent-phone-quick-create/

    It's not that elegant, but works.

  • DawnK Profile Picture
    90 on at

    Thank you Wahaj!  I will try this!

  • Maznira Profile Picture
    5 on at

    Hello Wahaj, I tried to implement your solution, but when clicking the phone button, I receive an error. Is there any other way to disable it? Thanks

  • PaulOFarrellKeyMedia Profile Picture
    5 on at

    Hi Wahaj,

    The script you provided in your blog worked successfully for our Dynamics 365 instance. However, recently, this is no longer working. We have tried to recreate the web resource but it will no longer close the quick create form

    Do you know of any updates required to get this script working again?

    Thanks,

    Paul

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans