I would like learn or get some guidance on how to add new fields on the report. The report I would like to edit Human Resources - Reports - Time and attendance - Attendance and add the field (Office Location) on the report from Human resources - Common - Workers - Employees (See file below)
I've made a copy of an existing report to which I plan to make modifications. I had to change references on the dataset parameters to match the new project in Visual Studio.
After getting the new Visual Studio project to compile and deploy, when the new report is run from the new menu item, it displays one of the parameters from the report contract twice. The parameter is always set to True in the Data Provider processReport method, which causes incorrect filtering during processing.
I have looked at everything, and I don't see anywhere that the parameter is duplicated.
Has anyone run into this issue before? Any suggestions for a resolution?
we got Update 2 installed on our environments last week and since then we're not able to create indexes in views. Doesn't matter if we're extending or the view is new, the option isn't there anymore:
Also when building the solution we get this warning:
"ViewWithIndexes: Path: [AxView/DimAttributeCounterparty]:You have added an index to a view, but AX7 views do not support indexing: No index will be added to the view in SQL server. We suggest removing the index."
We haven't found any mention to this in the Update 2 notes nor anywhere on the internet. I just can't believe nobody has had this issue after applying update 2, specially when indexes are used in views when creating new Dimensions (DimAttribute pattern). I'm starting to think that our environments haven't been correctly patched/updated or there's some setup error.
I have an existing app whose UI is based on windows 8 and backend on WCF web service for AX 2012 R3. I want to use this app for Dynamics 365 for Operation.
I need to open a URL on a button click. I found that infolog has urllookup method which does this. However that method isnt available in Dynamics 365 for Operations.
Is it possible to set a conditional table relation in AX in the sense that the value of a field in the parent table would dictate what child table the relationship is linked to.
Lets say for example I have field called "Account Type" and its an enum that can be Customer or Vendor.
I then have a field called "Account No.", I would like the relationship of my field "Account No." to be to the CustTable if "Account Type" == Customer and the VendTable if the "Account Type" == Vendor.
A good example of what i'm trying to do is the Journal lines/price discount agreement form under sales and marketing module. Under the overview tab, there is account code and account selection. I'm trying it to set it so that new will link account selection my new form/table drop-down. I apologize for this lengthy description. Please let me know if more clarification is needed.
I've a table with AccountRelation field(extends to PriceDiscAccountCode) and AccountRelation field(extends to PriceDiscAccountRelation). If the Accountcode selection is "table" then it will show customer name and account drop-down in account selection field. However, if the Accoundcode selection is a "group" then I need account selection to show a new drop-down(custom table). I've tried creating a table relation of type normal to new field from the new table... but this doesn't pull in the cust/vent table relation. Any tips on how I can get this to work without writing systablelookup code? I'm trying to use table relation to create drop-down.
I use X++ to create Service in AX to get data from AX, but when deploy I've got a problem that:
I can get data from services that get data from table object exist in AX 2009
but I can't get data from services that get data from table object (tables was created when upgrade from AX 2009 to AX 2012), it hasn't got error from service but data always return 0 items object
In detail action:
In development environment, I'm coding completely in AX 2012 so that services run completely OK
when deploy to production environment, I export axmodel file from AX 2012 in dev environment then use axmodel to import to pro environment
Can anyone help me to show problem in this scenario ? what's different from here ?
User interface in AX 7 (Dynamics 365 for Operations) is now in web browser, which forced Microsoft to make many fundamental changes. Obviously, they had to rewrite all controls to HTML (plus JavaScript and CSS), but it has many additional consequences. For example, it’s not possible anymore to run X++ code on client; all X++ code runs on server. If something happens in browser, such as you click a button, the browser can still call X++ code on server, but the call over internet is quite slow. Another option is running client-side logic written in JavaScript. In either case, it’s quite different from how older versions of AX worked. On the other hand, it all gives us a plenty of new options.
AX developers usually don’t have to care about any HTML, JavaScript and so on; they deal with controls (such as buttons and grids), both in designer and in X++ code. The whole rendering to HTML, client scripting, communication with server and so on is done by controls themselves, with the help of AX kernel.
That you don’t usually have to care about how control work doesn’t mean that it isn’t useful. It can help you with debugging and exploring capabilities of existing controls, but most importantly it allows you to design new controls for your particular requirements. This is extremely powerful and it’s not too complicated either. Of course, you must know something about HTML and JavaScript, and you’ll find that designing a control that works great in all cases (small resolution, right-to-left languages etc.) isn’t completely trivial, but don’t bother about it right now.
Let’s build a simple control showing a map for given coordinates. I’m not going to dive into much details, explain all capabilities and so on; I want to show a case from beginning to end without any distractions. If you want to build a more useful control, you’ll still have to go to documentation and learn about additional features from there.
First of all, we need a so-called “build class”, which defines how the control behaves at design time in Visual Studio.
Create an X++ class called MyMapControlBuild and paste the following code there:
The class inherits from FormBuildControl and has an attribute defining its human-friendly name. It also contains three fields (latitude, longitude and zoom) and corresponding parm* methods, each decorated with FormDesignPropertyAttribute. We’ll see these three properties in the form designer; we’ll be able to set their values and later we’ll use them to show something on the map.
The second argument of FormDesignPropertyAttribute is the category of properties, which seems to be ignored in the moment (but I still think you should use it; hopefully it will become supported later).
Then we need one more class, a so-called “runtime class”. It represents the X++ part of the actual control when rendered in user interface. You could put more logic there, but in this case, we’ll only expose our properties.
Let’s do it in a few steps. Create a new class, MyMapControl, with the following code.
The last missing piece is the initialization of the control from the build class. We take values of designer properties and put them into our actual control.
Build the solution, create a new form and add the new control, My map (the name comes from FormDesignControlAttribute).
Image may be NSFW. Clik here to view.
We can’t successfully run the form yet, because we still haven’t defined how the control should render, but we can work with the control in designer, set its properties, possibly override its methods and so on.
Image may be NSFW. Clik here to view.
If you open properties, you’ll see our three custom properties (Latitude, Longitude and Zoom), together with many other properties common to all controls (such as Visible). I would expect to see a new group of properties, Map, but it’s not how it works in the moment.
Fill in your favorite GPS coordinates, a zoom level and the required size of the control.
Image may be NSFW. Clik here to view.
This is all for now, we’ll add HTML and JavaScript in the next blog post.
I have little doubt regarding duplicating VM's database. In AX 2012 we were used to export database and import it to required environment with some modifications. Is it possible to do same on AX 7? Please provide if there is any link available for reference. I have tried to find but I think this way no one has still tried to make new environment.
The first part of this mini-tutorial showed how to create necessary classes for an extensible control. We have X++ classes for a control showing maps, we’ve added the control to a form and set a few properties. Now we have to add some HTML and JavaScript to do the job in browser.
Create a text file on disk, set its name to MyMap.htm and put this HTML code inside:
It’s very simple. We have a single div representing our control, with appropriate ID. Then we use data-dyn-bind attribute to set some properties based on data from AX. It’s not strictly necessary for this example, but we would have to set some size anyway, so why not to use the right way?
At the bottom, we refer to some JavaScript files. The first one is the usual Google API, the other is a reference to a JavaScript file that we’ll add in a moment.
Create a new resource in your Visual Studio project, name it MyMapHTM and when asked for a file, use the file that you’ve just created.
We also need a resource for JavaScript. Create a file, MyMap.js, with this content:
It all works for me without any API key, although it’s officially required. If needed, you can easily create a new API key. And you definitely should provide a key if you use this API in production.
I’m not going to explain the JavaScript code in detail. In short, it loads and calls the Google Maps API when our controls loads, it provides a callback function that sets properties of the map. It’s important to notice how we use values of our properties, such as $dyn.value(data.Latitude). These values come from the runtime class, MyMapControl.
As with HTML, create a resource, call it MyMapJS and add MyMap.js there.
Notice that you can edit resource files directly in Visual Studio.
Image may be NSFW. Clik here to view.
And we’re done! Build the solution, run the form and you should see a map like this:
Image may be NSFW. Clik here to view.
If you don’t see anything, make sure you’ve set Height and Width of the control, because my implementation doesn’t provide any minimal size.
If you have some other problem, you can use the debugger in Visual Studio (if it’s related to X++ classes), or press F12 in your browser to review DOM, debug JavaScript and so on.
Note that the control doesn’t merely show a picture; it’s a fully functional Google map – you can scroll, zoom the map or switch to StreetView, for example.
This control is deliberately very simple and doesn’t provide any additional logic, but you could easily utilize the JavaScript API to add pins or routes and do a plenty of other useful stuff. The control also doesn’t accept any input from users, so we didn’t need any binding to datasources nor any commands reacting to user actions, although all these things are possible. It’s always good to start with something simple and complicate things only when basics are clear enough.
Let me show just more one thing that the control already supports – setting properties from code.
Open the form in designer, find the map control (MyMapControl1) and set its AutoDeclaration property of to Yes. Then override form’s init() method and put the following code there:
When you run the form, you should see a map for coordinates provided in code and not those set in properties in designer. That was easy. Image may be NSFW. Clik here to view.
As you see, creating custom controls isn’t that complicated. The X++ classes we wrote have a few dozen lines of code, but they’re actually very simple; they do little more than just defining our three properties. If needed for your controls, you can put any arbitrary logic there and you’ll be able to manage and debug it as any other X++ code. How difficult is building the front end depends on your proficiency in HTML and especially JavaScript. You obviously can’t build a web UI without any knowledge of web technologies, but on the other hand, you build just a control and not the whole application.
When design robust controls, you should take into account several things not needed for simple examples like this, such as localization and responsive design.
I think Microsoft made a smart move by designing this framework for extensible control and making it available to everybody. Although it was possible to create custom controls in older versions of AX as well (using ActiveX and managed controls), this is fully integrated (including design-time experience in Visual Studio) and it’s really easy to use. I don’t say it’s completely trivial, but it’s not anything obscure either. I’m looking forward to building more extensible controls myself.
I'm using insert_recordset function to copy data from one table to another but the thing is its duplicating records. So any Idea how to avoid or Reject Duplicates while copying data ?
We have requirement to integrate AX with external system. We have some business requirement to allow the data from external systems in following AX tables. I created one virtual database with following tables and need to allow data from external system. Once data is dump to Virtual database it should be transfer to Actual database. Could you please Iet me know which tools will use for integration and share with me any sample projects.
What are really the opportunities for a Team Member in Dynamics 365?
I have read they have read access in most of the apps in Dynamics 365? They can also report time and expenses, take out a few reports ( If I'm not mistaken? ).
Since the cost difference is so huge between Enterprise and Team Member, what are the difference in functionality? I know that Microsoft are some what unsure With Team Member and access to Field Services.. But have they figured it out?
I have deleted my userId from AX SQLTable (UserInfo) and create a new user with different UserId but same alias( deleted user) as per suggested by experts in below thread:
Now , I am able to create new user and i can able to see Private project Name but i can't able to see private Project Objects inside of deleted user even both user have same alias and both are the same Active directory user.