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?
Discussion posts and replies are publicly visible
You can just index data out of record type and then use same cdtdifference() function
Stewart Burchell isn't CDTdifference you creation ;)?
varunbawa said: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?
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.
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.
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.
Hi - 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.
Yes, exactly. I am seeing no other way except manual compare or casting into cdt and then compare using function.
Hi, Did you find an answer for this. Even I have the same requirement..
Stewart Burchell Hi Stewart, someone just asked me this exact question in terms of how they will migrate from comparison of cdts to records in the future? have you had any more thoughts on this. The use case is a very granular audit trail of field level changes, by who, when etc.
This works fine in CDT comparison, its the longer term thinking around this the client is concerned with.
Would be interesting to hear of any other suggestions from anyone ... apart from database triggers ;)
Dai