web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Add a computed column on a view extension caused error during database synch

(0) ShareShare
ReportReport
Posted on by 618

Hi,

i like to extend the PurchLineBackorder view with a computed column. Therefore I extend the view as follows:

pastedimage1677585509317v2.png

I also write a new methode as follows:

/// <summary>
/// code extension for PurchLineBackorder view
/// </summary>
[ExtensionOf(viewstr(PurchLineBackorder))]
internal final class myPurchLineBackorder_Extension
{
    /// <summary>
    /// get the created date from current purchline
    /// </summary>
    /// <returns>created date</returns>
    internal static str getPurchLineCreatedDate()
    {
        return SysComputedColumn::returnField(viewstr(PurchLineBackorder), tableStr(PurchLine), fieldStr(PurchLine, CreatedDateTime));
    }
 
}

The build ended with no error but the database synch caused this error:

Log level - Error | Infolog diagnostic message: 'Error executing code: AJHPurchLineBackorder_Extension object does not have
method 'getPurchLineCreatedDate'.' on category 'Error'.

I don't know how to fix it...
I have the same question (0)
  • Martin Dráb Profile Picture
    238,751 Most Valuable Professional on at

    I see that the name in the error message is different. It may be caused by how you shared the information with us, but it's worth checking.

    Otherwise I don't see anything wrong. Try rebuilding the model (not just a project).

  • Christian Busche Profile Picture
    618 on at

    Martin,

    you are right, the name in error message is diffenrent than the one in the class... I forgot to change it in the error message...

    But... I build the whole model for several times but it is still not working...

    Funny is that the error occurs during synch the database also during synchronise it out of the solution/project... the build gets no error?

    by the way... I post this question inadvertently also with 480586... How can I clean it with deleting one of the questions?

  • Christian Busche Profile Picture
    618 on at

    Hi Martin,

    Is there a known issue with views under Visual Studio PlatformVersion 55?

    On the one hand I have the already mentioned problem of a view extension, on the other hand I can build and synchronize a new created view, but I cannot access it in the table browser ("You are not authorized to access the table..."). Also the created view is not visible in the SQL Manager...

  • Martin Dráb Profile Picture
    238,751 Most Valuable Professional on at

    Successfully synchronized views definitely should be in the database (and visible in SSMS). Either you aren't checking it correctly (looking to a wrong DB, not refreshing the list...) or the view wasn't successfully synchronized.

  • Suggested answer
    Christian Busche Profile Picture
    618 on at

    Martin,

    after rework on the view settings I found the error... The flag ENABLED was set to NO... When I set it to YES the view is available in SSMS and in the browser as well...

    And the error of the computed column was because of not setting the branch number in method parameters... ;-)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 509 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 375

#3
Adis Profile Picture

Adis 268 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans