Hi,
i like to extend the PurchLineBackorder view with a computed column. Therefore I extend the view as follows:
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...
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... ;-)
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.
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,
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?
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).
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156