Where can I find table and field specs on the existing tables in Business Central? - dynamics-business-central

I'm trying to create Relations to fields in other tables from the standard BC install.
For example adding a table with a field having a Relation to the UOM table in Business Central.
From my current knowledge, what I'm seeeing, on the table list, what shows is the table caption, where can I find the full list of specs on the built-in tables?

There are a few methods you can use:
If you use docker and have created a container with BcContainerHelper to download symbols from you will have the folder C:\bcartifacts.cache which will contain the source code for the version you are developing against.
The Visual Studio Code extension AZ AL Dev Tools/AL Code Outline has a feature that will display the objects in a given symbols file. You can then navigate from an object to the source code. All you need to do is install the extension in Visual Studio Code and then click the relevant symbols file in your .alpackages folder.

Related

Custom properties/tags is replaced with actual values in MS Word using code or any SDK

I have scenario as I have a template in a Microsoft Word document (.docx) that has placeholders / tags / custom properties that say "{!CompanyName}" since I have a business necessity. This will later, after processing, be combined with the real database table contents or any other source values, and saved as a new Word document (.doc).
Which free SDK works the best for .net core?
Support for the following key feature should be included in the SDK 
tag replacement with actual data
Auto-generated table and rows
Image insertion into the template
Conditional check.
Please make a suggestion here!

A few questions regarding importing a manually created data entity

I used the data entity creation wizard and selected Reqplan table as the main data source, then I manually added ReqPlanVersion, ReqPO, ReqTrans table as additional data sources and created the relationships below.
As for the data entities fields I manually dragged a subsets of fields from the three manually added tables.
However when I try to import the data and add file, I receive the following issue:
Q1. In the past for some other entities I have changed ‘Allow Edit on Create’ from ‘Auto’ to ‘YES’ on these fields and it has worked but I am not sure if it’s the only way or is it following best practice? Also what is the determining factor for a field to be editable or not during import since they are all on AUTO?
When I try to map source to staging manually by drawing the mapping lines I get below issue:
Q2. What is going on with the configuration key? Is it because I manually dragged the fields from the additional data sources but not using the data entity creation wizard?
Lastly I been getting below issue:
Q3: Is there a way to find out which unique key it is referring to? Is it talking about the EntityKey in my Data Entity or Indexes in staging table? In either case there are more than one so I am not sure what it is referring to?
Thanks in advance.
Response from the community forum:
1) Check allowEdit property on table itself, so if it is "No" there then auto means "No". If you want to update them through data entity you will have to force them to "Yes"
2) It's not connected to manual addition, it just says that tables used in the entity has configuration key disabled, so you cannot export or import data into them, however, these tables could be added by wizard or manually, it does not matter. Also, Configuration key could be on fields as well or on EDT that these fields use, check them as well.
3) Entity has Key node and there and there you have key generated by wizard for you. It is used by framework to understand if record should be updated or created, if it does not work for you, change it on the data entity and regenerate staging. You need to refresh staging because error you get is SQL error, at this stage SSIS transfers data from a file into a staging table and data could not be copied because of index vialotion, so check staging table index and see if your file has any duplicates.

Dynamics CRM Online - Modifing an existing report

I am trying to modify an existing report (Orders) and I must be doing something wrong because when I export the report and I open it in Visual Studio I don't see the actual report.
As you can see the actual report is not being displayed.
I go to the report entity in Workplace, select the report and click on Edit. From there I go to More Actions and click on Download Report. I then go into SQL Server Data Tools and create a Report Server Project. I then go to the Report folder, right click and Add Existing Item, selecting the order.rdl file.
What am I doing wrong?
.....
After some more research it's my understanding that none of the queries come down as FetchXml but as SQL statements that have to be converted to FetchXml.
One problem That I'm having is the use of a function. How does that get converted to FetchXml?
SELECT fullname
FROM FilteredSystemUser
WHERE (systemuserid = dbo.fn_FindUserGuid())
Thanks,
Gary
Your main problem is that you environment is Dynamics CRM Online, this means that you need to create your reports only with FetchXML, no SQL reports are allowed.
The second problem is that you want to modify a built-in report , because most of the standard reports (I'm not sure if all the reports but Order is one of them) are built using SQL you can't modify and import back, you need to recreate using FetchXML.
Last thing, the report you opened refers to a sub report (stored in a separate rdl file)

Adding table from another database to ASP.NET Dynamic Data + Entity Framework

I have a table in another database I would like to scaffold via ASP.NET Dynamic Data and incorporate into my existing Entity Model - is there anyway to do this? (eg using a view or other mechanism or customize the view, edit or insert operations via ad-hoc SQL or stored procedures?)
I don't want to replicate the entire DynamicData sub-folder structure and create another entity model for just one table
I was able to solve this by manually creating an entity in the SSDL and CSDL sections of the .edmx file by using a DefiningQuery and then defining the EntitySets for my entity class
I also added insert / update / delete Function elements to the SSDL with inline SQL using the CommandText property
At this point I had enough to let the Designer map the CRUD methods to these inline SQL functions I defined
It's a little tricky but it works and the general approach opens up many possibilities I had not thought about

umbraco and custom system table

I have the following scenario:
My website db has a system table called "Companies", which includes an id field, companyName field, and companyImageUrl field.
How do I set up an umbraco document type for adding entries to this table ?
Maybe I shouldn't use a custom table at all ?
Thanks.
As far as I know, Umbraco doesn't support what you want to do out of the box (mapping a document type to a table that isn't part of the umbraco core).
One approach that might work is to create an action handler that syncs a Company doc type to your table when creating a node of that type.
It's a bit of a hack though. I've found that I've very rarely needed to create custom tables. What exactly are you trying to do with it? My guess is that you don't really need it and would be better off working with a doc type instead. Umbraco provides a variety of ways to get and act upon doc types from within custom C# code (check out the umbraco.NodeFactory namespace). You'll also get the added benefit of being able to easily interact with these nodes from XSLT/Razor.

Resources