Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Sync error on computed column in a view when "Valid Time State Enabled" set to "Yes"

(0) ShareShare
ReportReport
Posted on by 1,650

Hello,

I have the strange situation that the activation of a "Valid Time State Enabled" = "Yes" leads to a synchronisation error. Here is the detailed description of the situation:

My view is based on a query with multiple tables including two times LogisticsPostalAddress

8883.Query.png

The view contains the following fields with some simple computed columns:

3252.View.png

    public static server str accountNumSQL()
    {
        TableName       view = tableStr(???BankAccountVendCustTransView);
        ;
        return SysComputedColumn::if(SysComputedColumn::isNullExpression(SysComputedColumn::comparisonField(view, identifierStr(CustTable), fieldStr(CustTable, AccountNum)))
                                   , SysComputedColumn::returnField(tableStr(???BankAccountVendCustTransView), identifierStr(VendTable), fieldStr(VendTable, AccountNum))
                                   , SysComputedColumn::returnField(tableStr(???BankAccountVendCustTransView), identifierStr(CustTable), fieldStr(CustTable, AccountNum)));
    }

At this point everything works fine (Build & Sync). As a result I see all values in the view as expected.

Because some of the customers / vendors changed their addresses the join on the LogisticsPostalAddress will double the records because of the "ValidTimeState" handling of the table. So I tried to get rid of this with the view property "Valid Time State Enabled" = "Yes". (the relevant ValidFrom / ValidTo fields are already in the view and were synchronised correctly before the change of the property).

After changing the property the build runs without an error but the synchronisation ends up with a strange error pointing to the computed column:

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt.".....

6332.ERROR.png

Do you have any hint for me how I could solve this.

Thanks

Sebastian

  • Sebastian Aurand Profile Picture
    1,650 on at
    RE: Sync error on computed column in a view when "Valid Time State Enabled" set to "Yes"

    I think I've got the reason for the error. The view is missing the fields with the name "ValidFrom" and "ValidTo". Because I have two datatsources of type "LogisticsPostalAddress" with ValidFrom and ValidTo, I initially renamed them in order to distinguish them.

    As soon as I named one of the fields "ValidFrom" / "ValidTo" the error is gone.

    Unfortunatly the error message in this case was very misleading for me.

    Thanks again Martin for your suppport and merry christmas ;-)

  • Martin Dráb Profile Picture
    231,852 Most Valuable Professional on at
    RE: Sync error on computed column in a view when "Valid Time State Enabled" set to "Yes"

    It seems to be a bug in kernel, therefore you should log a support request with Microsoft. At least we have simple steps for reproducing the problem.

  • Sebastian Aurand Profile Picture
    1,650 on at
    RE: Sync error on computed column in a view when "Valid Time State Enabled" set to "Yes"

    Hello Martin,

    thanks for the response. I tried your suggestion with the runnable class:

    2211.RunnableClass.png

    The beavior is identical. With the view property "Valdi Time State Enabled" set to "No" the runnable class runs fine:

    0160.NoError.png

    Afterwards I only changed the property to "Yes" and the known error comes up:

    8877.ERROR2.png

    It seems as the view is not longer known!?!?

    Sebastian

  • Martin Dráb Profile Picture
    231,852 Most Valuable Professional on at
    RE: Sync error on computed column in a view when "Valid Time State Enabled" set to "Yes"

    According to the stack trace, the error is throw from comparisonField().

    Will you get the same error when you execute your code in a runnable classs?

    SysComputedColumn::comparisonField(
    	tableStr(???BankAccountVendCustTransView),
    	identifierStr(CustTable),
    	fieldStr(CustTable, AccountNum));

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,027 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,852 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans