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 CRM (Archived)

In-built Function on Calculated field

(0) ShareShare
ReportReport
Posted on by 1,077

Hello,

I have an issue with DIFFINDAYS formula in Calculated field. It calculates days difference based on Calendar days. It is not excluding holidays and weekends. I found many plugin codes to set/update a static field on form. But, I need this logic to work on a calculated field on Advanced Find personal view so that it calculates dynamically when ever view is opened/refreshed.

Is it possible to write my own custom function to calculate days difference based on my own logic? Can someone help me how to address this?

FYI, I tried an alternative method to use JScript webresource and call a function on Column property of Personal View on Advanced find. See the below image. But I am not sure how to set and display dynamics calculated values on a Column of view. Is there any Jscript statement to set value to a column on view?

setTimeDurationSinceCaseCreation.jpg

Ideas are most welcome and Many thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    Javacript will not be a good solution as it changes the value on the browser and not in the actual database. So assuming you are able to achieve this using JS, the users will notice descepencies when they actualy opened the record.

    Also, calculated field will use calendar day which is by design and cannot be changed. What you can do is to write your own custom implementation. There is a workflow utility which you can use-

    github.com/.../releases

    Its a workflow activity so you can add it yourworkflow which you can then trigger on create/update. This will not work on Views or when the record is opened so for that you can trigger this workflow using this plugin on Retrieve & Retrieve multiple. This can be done by triggering the workflow by som dummy field and on set that field inside your plugins.

    Hope this helps.

  • Verified answer
    Sid07 Profile Picture
    285 on at

    You can instead right a plugin on RetrieveMultiple message and have the logic displayed as you want.

    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

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans