Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Phone Call - Dynamically change activity's status

(0) ShareShare
ReportReport
Posted on by 165

Hello,

I've added a custom two-options field in the phone call form, where user can select if the phone call is Completed or Scheduled.
The requirement is that when user selects 'Completed', the Activity status of the phone call should automatically change to 'made' and the user shouldn't have to manually close the activity via the dialogue.

I've made a workflow where I change status to 'Made' if user has selected 'Completed' but it does not seem to work.

Any help would be much appreciated.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Phone Call - Dynamically change activity's status

    Hi irenegr,

    1.workflow.

    You can create a workflow to change status when field value has changed with ‘completed’

    pastedimage1599213555430v1.pngpastedimage1599213563873v2.png

    You can go settings > System Job to see running details of the workflow.

    Through test, I notice that the workflow only run when record create, though option field change, it can’t trigger the workflow.

    So if you want to change status when option field change, add Js code to onChange event is a good way.

    2.JS

    (1) JS code.

    function setState(executionContext) {
        var formContext = executionContext.getFormContext();
        var option = formContext.getAttribute("new_selectstatus").getValue();
        if(option==true)
        {
        Xrm.Page.getAttribute("statecode").setValue(1);
        }
    }

    (2) Add your JavaScript code in a Script web resource.

     pastedimage1599213577386v3.png

    (3) Add an OnChange event with this Script web resource to the Phone call entity form.

    pastedimage1599213584089v4.pngpastedimage1599213593668v5.png

    (4) Test

    pastedimage1599213603230v6.png 

     

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Phone Call - Dynamically change activity's status

    On top of what others have already suggested,  make sure the workflow scope is set to Organisation level and also make sure the workflow is set to trigger on the two options field value change.   Could you share a screenshot of your workflow?

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at
    RE: Phone Call - Dynamically change activity's status

    Could you please check the process sessions of the workflow and check last run. if not there try triggering it again.

    see if something is failing there?

  • irenegr Profile Picture
    165 on at
    RE: Phone Call - Dynamically change activity's status

    I use 'change status'

  • Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Phone Call - Dynamically change activity's status

    Hi,

    Can you use Change status option instead of update record in workflow.

    Please mark my answer verified if i were helpful

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 > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans