Skip to main content
varunb579494
January 24, 2023
Question

Is there any way to compare two record values of same record type to find the difference?

  • January 24, 2023
  • 13 replies
  • 0 views

I have the requirement to find the difference between two record values of a record type like we do in case of cdts using cdtdifference(). I have the previous value of record type and then new value, I need to populate Audit table using these difference values.

Any function like cdtdifference() or any workaround to do this?

13 replies

gayathris111098
February 3, 2023

You can just index data out of record type and then use same cdtdifference() function

richardm900458
February 3, 2023

[mention:7628077af4b9463e9533a897fad2351f:e9ed411860ed4f2ba0265705b8793d05]  isn't CDTdifference you creation ;)? 

stewart.burchell
February 6, 2023

Hi [mention:c03f69cc9b264af29d5e31ca80c64eff:e9ed411860ed4f2ba0265705b8793d05] - yes, CDT Diff Utilities is a plug-in I wrote a long time ago. But here it looks like the question being asked is how to find the difference between two run-time instances of a Record type.

varunb579494
February 6, 2023

Yes, exactly. I am seeing no other way except manual compare or casting into cdt and then compare using function.

richardm900458
February 3, 2023
I have the requirement to find the difference between two record values of a record type

what do you miss at cdtdifference that you need a workaround?

varunb579494
February 4, 2023

cdtdifference works for me but I have to cast the record in cdt first then it's working. Is there any direct way of comparison or function like cdt difference.

Because, the only reason is the application is completey record based, they are moving away from cdts slowly in the app enhancements, so need a direct way of comparison.

sowmiyau0001
February 3, 2023

Hi,

We should type cast the record data into dictionary/cdt type and then we can give those type casted data as input for cdtdifference() function.

Please find the solution in below.

varunb579494
February 4, 2023

Even I am doing the same at present but the upcoming app architecture will have no cdts in use. So later I won't be able to do this. Any direct way to do this.

February 15, 2024

Hi, Did you find an answer for this. Even I have the same requirement..