Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to calculate a "Calculated Field" within Values in other Tables ?

Posted on by

Hello everybody,

firstly i want to say sorry for my bad english.
I m new CRM Dynamics 365 and trying with a big project. This project is about a big database which a already created.
I find this system Super because with a good SQL knowledge. I created a big database in one week
*******My QUESTION**********
The first problem that i encountered with this system is the possibility to get values from other Entities (tables). I tried a lot this day to get it but without a result!! :(

I have too big tables with have 3 common columns and i want to put three condition to get at the end one value from a table and multiply it with a value in the first one.

To clarify it :_ (NB: THERE IS NO RELATIONSHIP BETWEEN THIS TABLES)
Table 1:  has  ID - Country - Technology - Type - SubTechnology - Year - Rate

Table 2: has ID - Country - Type - Priceseg - Weight - Year - Population  - Result (Calculated Field)

I want to put 3 condition  (Table1.Country = Table2.Country and Table1.Type = Table2.Type and Table1.YEAR = Table2.YEAR)
IF YES get the RATE  and multiply it with Population.

I can't use any SDK

Thanking you in anticipation!

*This post is locked for comments

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: How to calculate a "Calculated Field" within Values in other Tables ?

    Hi Aminovic,

     I would add to those two responses above that you should simply stop thinking in the database terms. Dynamics is not a database management system, and you are not supposed to do anything with the database.

     Instead, start thinking in the "supported" terms (advanced find, ssrs reports, sdk, javascript, workflows, etc)

     In your case, maybe you should use an SDK.. maybe you can mix SDK with calculated fileds.. I guess what we need to know is not how it looks like in the database, but what is the end results supposed to be in Dynamics.

  • prt33k Profile Picture
    prt33k 6,907 on at
    RE: How to calculate a "Calculated Field" within Values in other Tables ?

    Few question:

    1. Is it CRM online or OnPrem?

    2. The 2 tables are CRM entities I believe. Country, Type and Year are the common field. Are the datatype for these 3 field a lookup type or are they string?

    3. Why cant you use SDK?

    If it is CRM Onprem then you will haves access to SQL and then it is pretty staight forward.

    However, if it is CRM online then it is tricky and and you have to use SDK.

    Thanks,

    Pratek

  • Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: How to calculate a "Calculated Field" within Values in other Tables ?

    You can't do any of this through the database, you'll break CRM, and it's not supported at all.  I strongly recommend you stop now, because if you put any SQL code into a production CRM, it's only a matter of time before you hose that system.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans