AIF: How to add extra non database field into XSD.
The idea is to add new extra field into schema definition and into whole AIF process but do not have this field part of table or query. It could be simple “counted” field.
For now, we will start with new table and new query. When you generate document services by wizard, make sure that Generate AxBC class is checked.
The new project is now generated. Part of this project is a class with name Ax<table name>. This Class is inherited from AxInternalBase and there are method parm<fieldname>. Here you can add a new virtual method with name you want and with type you want. Datetype will be generic on in XSD (for example xs: string).
In my example I added field “Field8Extra”.
public str parmField8Extra(str _field8extra = '') { return "Modified field " + testTable.Field7; }
Now you can regenerate XSD by job file to check result.
My XSD file now have one more line with new field inside:
<xs:element minOccurs="0" name="Field8Extra" nillable="true" type="xs:string" />
--author: |
Karel Fischl |
--ediror: |
Karel Fischl |
--date: |
8/Dec/2011 |
We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!