Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, Power Apps, Power Automate, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I have read some tutorials for configuration AOS to enable debugging on the server side. But All of them are for AX 2012.
I want to know how can I debug my server side method which is written in the custom view in dynamic 365?
All code in D365FO runs on server. So, general D365FO debugging process will work.
I insert a break-point in my server method which is assigned to the computed column. this break point is not hit. By any chance is there any configuration I have missed?
Computed columns aren't run-time, but compile time. When a computed column field from your view or DE is read no code fires - it's pure SQL.
What do you mean with "my server method which is assigned to the computed column"? On what element is this element and when is it called?
As a side question Nikolaos - code that runs in batch. I've had an issue where I needed to debug a job while it is running in batch (I couldn't let it run in the session). Is there a way to achieve debugging when a job is run in batch?
if you want to debug a batch you should attach to the batch server process instead of w3wp/iisexpress.
Nastran, computed columns are not executed in Dynamics server (AOS), they are executed in SQL Server. Dynamics installer / sync engine simply tells SQL Server to create the computed column during database synchronization. You can't debug database sync, or the execution of the logic in the computed column.
To test the computed column, try this:
If your view synchronized:
Go to SQL Server Management Studio and find the view that you created a computed column to.
Right-Click > Script View as > CREATE to and you will get the VIEW definition where you will be able to see what computed column you have created.
If your view did not synchronize but compiled:
Try creating a similar method in a runnable class and info it as a message, so you know what you are getting.
Dear Pete ,
I have a veiw with prodcalcTrans datasource. my goal is adding resource name as a computed column to this view. Because the resource name is obtained by display method and it is not stored as a field in prodcalctrans table. so In my view I have three fields (1) resource (2) calcType (3) resourceName(which is computed column).
And if you want to test the value it's getting when just open that view in Table browser or select in SQL Server Management Studio.
You cannot use display methods in a computed column. Computed columns are very limited. Basically, you should be able to write the same computed column in SQL but you cannot use display methods there.
I would rather join in view's query whatever table is required to get ResourceName.
That's going to be a hectic computed column - I see it has conditional relations... Hold on - I'll write you a template
I know I can not use directly display method in the view columns. I have tried to write the logic behind that display method.If you see InventTableExpanded view you can see that there is computed column called product name. There is a method which simulates the logic behind the productName display method in inventTable .
This is sql version of my view. should I expect my logic in front of the ResourceName column?
CREATE VIEW [dbo].[MyView] AS
SELECT T1.RESOURCE_ AS RESOURCE_, T1.CALCTYPE AS CALCTYPE,
T1.DATAAREAID AS DATAAREAID, T1.PARTITION AS PARTITION, T1.RECID AS RECID,
(CAST ((N'') AS NVARCHAR(225))) AS RESOURCENAME FROM PRODCALCTRANS T1
OK, it's clearly empty string.
So you need to validate what statement you are forming.
Can you screenshot your computed column code?
You can try to form a computed column using CASE statements as the display method is quite complex.
WHEN condition1 THEN select something from somewhere where condition
WHEN condition2 THEN select something from somewhere where condition
WHEN conditionN THEN select something from somewhere where condition
this is my method :
private static server str ItemOrResource()
str _resource = SysComputedColumn::returnField(tableStr(MyView),identifierStr(ProdCalcTrans),fieldStr(ProdCalcTrans, Resource));
str _calcType = SysComputedColumn::returnField(tableStr(MyView),identifierStr(ProdCalcTrans),fieldStr(ProdCalcTrans, CalcType));
select firstonly Name from wrkCtrTable
where wrkCtrTable.WrkCtrId == _resource;
select firstonly Description from costSheetNodeTable
where costSheetNodeTable.Code == _resource
&& costSheetNodeTable.SheetId == CostSheetTable::defaultCostSheetTable().SheetId;
private static boolean isResourceCost(int _calcType)
if (_calcType == 4 ||
_calcType == 5 ||
_calcType == 6)
private static boolean isIndirectCost(int _calcType)
if (_calcType == 7 ||
_calcType == 8 ||
_calcType == 10 ||
_calcType == 14 ||
_calcType == 16)
public class XYZView extends common
private static str resourceName()
private static Map constructMap()
Map map = SysComputedColumn::comparisionExpressionMap();
//insert other ItemCalcType elements that would mean a relation to InventTable
//insert other ItemCalcType elements that would mean a relation to WrkCtrTable
private static str itemName()
// It is another process to get the actual item name
// For this example I just took NameAlias
private static str wrkCtrName()
Business Applications communities