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 :
Dynamics 365 Community / Forums / Sales forum / Workflow to detect whe...
Sales forum

Workflow to detect when Phone Call record has a Phone Number less than 5 characters long

(0) ShareShare
ReportReport
Posted on by 267

We have the basic 3CX integration and it creates call records for internal calls as well as external calls.

How would I go about setting up a workflow to check if the Phone Call has a Phone Number that is less than 5 characters long? I tried 'is less than' '9999' but it didn't seem to like that...

Thanks!

Categories:
I have the same question (0)
  • Suggested answer
    Radu Chiribelea Profile Picture
    6,667 on at

    Hi MichelleM,

    You can do this via a Plug-in triggered / custom workflow activity triggered on the create & update of the phone call field.

    Within the plug-in you add the logic to check the formatting of the phone number and then follow you business processes (throw an exception, format the record properly, etc.)

    Hope this helps,

    Radu

  • MichelleM Profile Picture
    267 on at

    Thanks Radu, I think it's the logic I am having trouble with. How can I check the number of chars in the field in the workflow builder rather than whether the number is less than some value?

  • Suggested answer
    Radu Chiribelea Profile Picture
    6,667 on at

    Hi Michelle,

    One option you can explore is to create the phone number field as a Text Field.

    Once the record is created you can check the string length of the phone number field - see msdn.microsoft.com/.../system.string.length(v=vs.110).aspx

    for example

    string phoneNumber = entity["your_phone_field"].ToString();
    
    if(phoneNumber.Length < 5)
    {
        throw new InvalidPluginExecutionException("Phone number is lass than 5 characters long. Please enter a correct one");
    }


    Hope this helps,

    Radu

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Sales

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans