Quantcast
Channel: AXForum
Viewing all 14618 articles
Browse latest View live

axatoz: How to update PU20

$
0
0
Источник: https://axatoz.wordpress.com/2018/10...o-update-pu20/
==============

Step 1: Download PU20 from LCS



Step 2: Copy to a folder that is close to the root. When we run the command, there are going to be many subfolders with long path, the command might fail due to long path. To be safe, I copy to Temp folder like below

Step 3: Run cmd as Admin and use this command “AxupdateInstaller.exe quickInstall



Step 4: Run “Axupdateinstaller.exe list” command to validate



Enjoy



Источник: https://axatoz.wordpress.com/2018/10...o-update-pu20/

goshoom: Throwing managed exceptions from X++ in D365FO

$
0
0
Источник: http://dev.goshoom.net/en/2018/10/th...ed-exceptions/
==============

What I really miss in X++ is the ability to throw exception objects. If you throw an exception in X++, it’s just a number defining what kind of exception it is, which usually says just “Error” (Exception::Error). You also typically add a message to infolog, but the message in infolog and the exception don’t have any link.

Other object-oriented programming languages (such as Java, C# or Python) do it in a much better (object-oriented) way. You throw an object, which contains a lot of information about the error – the type (such as FileNotFoundException), a message, extra details such as the argument name of ArgumentNullException, a stack trace showing which sequence of calls led to the error and so on.

What I consider the most important is the type. This is necessary for meaningful recovery from errors. For example, you’ll go back to user when an error says that an input is invalid, while you may wait a while and try a request a bit later if you know that the error is about a network failure. If all you know is that there is an error, you can’t handle different errors in different ways; you can either stop execution when an error occurs or you’ll ignore all errors. Obviously, neither is ideal.

And other information besides type are is useful too. You may want to log stack trace of where the exception was thrown (not caught), you may want to know which parameter has a wrong value and so on.

I mentioned several times in previous blog posts that D365FO runs on the .NET (CLR) platform and you can catch exceptions objects of CLR exceptions (see Catching exceptions in AX 7). While this is useful, you can’t throw such exceptions from X++, therefore it alone can’t solve our problem.

But making it possible isn’t difficult. Let me show you my proof of concept.

What I wanted to achieve:
  • Ability to throw “normal” .NET exceptions from X++. For example, I want to throw ArgumentNullException rather than just error(“Wrong parameters specified”).
  • Ability to define and throw custom exceptions, specific to the business domain of D365FO.
  • Ability to catch these custom exceptions in the usual way.
  • Simple syntax for throwing these exceptions.
Throwing .NET exceptions from X++ can be easily done with a little C# class library. We can throw exception objects from C# and we can call C# methods from X++, therefore we can  instantiate an exception, pass it to a C# method and throw it from there.

This is the class in C#:

public class ExceptionHelper{ public static void ThrowException(Exception ex) { throw ex; }}






You could call it from X++ like this:

ExceptionHelper::ThrowException(new ArgumentNullException("_name");






While this works, it doesn’t look natural. I wanted something similar to throw error(“…”). We can’t throw exception objects with throw keyword in X++, but we can do this:

throw exception(new ArgumentNullException("_name"));






exception() is a global function calling the exception helper. It’s implemented in an extension of Global class:

[ExtensionOf(classStr(Global))]final static class Global_ManagedExceptions_Extension{ public static Exception exception(System.Exception _ex) { Goshoom.DynamicsAX.ExceptionHelper::ThrowException(_ex); // The return statement is never called because an exception is thrown above, // but it makes the method compatible with the throw statement. return Exception::Error; }}






The fact that it returns Exception::Error makes it usable in the throw statement. Calling just exception(…) has the same effect as throw exception(…), but the latter is nicely consistent with throw error(…).

When we can throw exception objects, why should we limit ourselves to existing exception classes? We can easily define our own, specific to our needs in D365FO.

For demonstration, I’ve implemented FieldEmptyException, where you can provide information about the field and the record in question. Later you can use this information for logging, for highlighting failing records or anything you like.

For example, here I’m checking if a record has a value in the Email field and I throw a FieldEmptyException if not.

SysUserInfo user = ... if (!user.Email){ throw exception(new FieldEmptyException(fieldStr(SysUserInfo, Email), user));}






Then we can catch FieldEmptyException and react to it, instead of catching all errors by the universal class catch (Exception::Error). We also have all details available when we catch the exception, as demonstrated here:



This infolog was generated by the following catch clause:

catch (fieldEmptyEx){ if (fieldEmptyEx.Record) { setPrefix("We can log all these details:"); info(strFmt("Exception type: %1", fieldEmptyEx.GetType().Name)); info(strFmt("Message: %1", fieldEmptyEx.Message)); info(strFmt("Table: %1", tableId2Name(fieldEmptyEx.Record.TableId))); info(strFmt("Field: %1", fieldEmptyEx.FieldName)); SysUserInfo user = fieldEmptyEx.Record as SysUserInfo; if (user) { info(strFmt("Data from the table: user ID %1, RecID %2", user.id, user.RecId)); } info(strFmt("Stack trace: %1", fieldEmptyEx.StackTrace)); }}






But if you want to use the usual catch (Exception::Error), you can! I’ve implemented FieldEmptyException as a specialization of ErrorException, therefore all logic working with the normal X++ errors still applies. This is important – you can start using these custom exceptions without worrying that they would stop being handled in existing code.

The complete source code (with examples) can be found on GitHub. It’s under MIT license, therefore you can do virtually anything with it, such as modifying it and including it in your commercial, closed-source solutions.



Источник: http://dev.goshoom.net/en/2018/10/th...ed-exceptions/

palleagermark: Debugger not hitting any breakpoints on new 8.1 boxes

$
0
0
Источник: http://www.agermark.com/2018/10/debu...points-on.html
==============

I have had a few 8.1 dev boxes where the debugger just wouldn't hit any breakpoints.

The cause is this related to this setting in Visual Studio:


On the new boxes where I have had the problem "Only specified modules" was active, but no modules were specified. You can change this to "All modules, unless excluded" or figure out precisely which modules add.

Источник: http://www.agermark.com/2018/10/debu...points-on.html

Консультант MS DAX

$
0
0
В связи с возросшим объемом работ по Аксапте, возросшим количеством пользователей открыта новая вакансия.

Ожидания:
Опыт описания, разработки, оптимизации и автоматизации бизнес-процессов,
Знание учета основных процессов производственного предприятия (логистика, транспорт, финансы и бухгалтерия, кадры, основные средства и иных),
Грамотный русский язык, хорошая письменная и устная речь.

Обязанности:
Подготовка технических заданий на разработку или модификацию корпоративных информационных систем,
Разработка и проведение тестирования разработанного функционала, подготовка инструкций, сопровождение его внедрения,
Анализ потребности бизнес-подразделений в автоматизации и реорганизации бизнес процессов с целью повышения их эффективности,
Инициирование требующихся для этого изменений в корпоративных информационных системах и бизнес-процессах,
Консультирование пользователей в системе MS DAX, формирование инструкций пользователей,
Инициативность, коммуникабельность, целеустремленность.

Условия:
Работа в крупной угледобывающей компании,
ДМС, питание, мобильная связь, спорт.зал
Работа в московском офисе, 1 мин. пешком от м. Филевский парк
Финансовые условия обсуждаются с успешным кандидатом от 120 000 рублей.

Резюме, вопросы, рекомендации прошу присылать на szlobin@sibanthracite.ru

crmtipoftheday: Tip #1182: The Tool Every Developer Needs (Even The Ones Who Don’t Use Code)

$
0
0
Источник: https://crmtipoftheday.com/1182/the-...dont-use-code/
==============

Whether your weapons are JavaScript and Plugins, or Processes and Flows,  there is a tool you should pick up before going anywhere near the keyboard. That is, of course, the pen.

This is a lesson I learned while at university with my computing lecturer insisting we write out our code before committing it to the screen. Our major assignment was to code a token ring network controller. It might have been tough to write out every line of Pascal to make it work but when I finally entered it into the computer, the entire thing was bug free. The time taken to write it out and think it through calmly and carefully paid dividends in not having to debug my otherwise incoherent, spaghetti code.

While I do not write every Workflow out in full before logging in to Dynamics, for the more complex ones there is a lot to be said for organising your thoughts on paper first. My general rule of thumb is if I cannot contain whatever it is I am developing on the screen (almost impossible for all but the most simple Flows), I write it out first. By going to a high level pseudo-version, I can see the algorithm on one page and usually improve my vision or discover issues which may not have been as visible in the weeds.

Often coders will lament that their non-coding associates do not have good habits when developing. For me this is the first good habit of any developer. The pen is mightier than the DWORD.



Источник: https://crmtipoftheday.com/1182/the-...dont-use-code/

dynamicsnavax: Debug POS using .NET Reflector

$
0
0
Источник: http://dynamicsnavax.blogspot.com/20...reflector.html
==============

Respect to all those POS developers. It really requires some dedication and focus to be a POS developer. This is an example of something I would have not figured out without my colleagues.




We were working on a development project and we struggled to make sense out of the error.

The error we got was complaining about the a method to validate the Unit of measure and Quantity. I was sure the object was not null and I had passed the right thing to it. Unit of measure and quantity fields were populated correctly. The modification was overriding the price.

System.NullReferenceException was unhandled by user code
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=Microsoft.Dynamics.Commerce.Runtime.Workflow
StackTrace:
at Microsoft.Dynamics.Commerce.Runtime.Workflow.CartWorkflowHelper.ValidateCartLineUnitOfMeasureAndQuantity(RequestContext context, Cart newCart, SalesTransaction salesTransaction, Dictionary`2 salesLineByLineId, CartLineValidationResults cartLineValidationResults)
at Microsoft.Dynamics.Commerce.Runtime.Workflow.CartWorkflowHelper.ValidateUpdateCartRequest(RequestContext context, SalesTransaction salesTransaction, SalesTransaction returnedSalesTransaction, Cart newCart, Boolean isGiftCardOperation, IDictionary`2 productByRecordId)
at Microsoft.Dynamics.Commerce.Runtime.Workflow.SaveCartRequestHandler.Process(SaveCartRequest request)
at Microsoft.Dynamics.Commerce.Runtime.SingleRequestHandler`2.Execute(Request request)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
at ECL.Commerce.Runtime.Donation.TriggerHandlers.SaveCartRequestHandler.Process(SaveCartRequest request)
at Microsoft.Dynamics.Commerce.Runtime.SingleRequestHandler`2.Execute(Request request)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
InnerException



After many hours over the course a few days we struggled. A colleague suggested to use .NET reflector (this is where you need an experienced retail developer). Using this tool, I was able to make sense of the problem.




Below are the steps to use .NET reflector.

1. Download .NET reflector

https://www.red-gate.com/products/do...ent/reflector/

2. Install following wizard. You can use the trial for 14 days or just active it with your serial number

When you install – I would recommend both the desktop and the visual studio extension



3. Select the assembly to debug. There are a couple of ways you can do that.

Select using the .NET Reflector > Generate PDBs (this will pop up a dialog to select the assembly)



Alternatively, from your solution explorer. Select the dll that is referenced and click on Enable Debugging.


4. This will launch the object browser.

Navigate to the method that caused the error. Then right click, Go to Decompiled Definition



5. I put a breakpoint and run through the process.

What I found was that it code used the salesTransaction object rather than the cartLine to get the unit of measure. Causing a cryptic error about unit of measure/quantity. In other words, I needed to create the cart line and save it to commit it to the salesTransaction first. Then after that process is finished, I can then override the price. i.e. 2 steps rather than trying to it all in one process.



I hope I don’t get in trouble of advising people to use .NET reflector by blogging here. I just don’t see how else I would have figure this thing out.



Источник: http://dynamicsnavax.blogspot.com/20...reflector.html

lcs: LCS (October – release 2) release notes

$
0
0
Источник: https://blogs.msdn.microsoft.com/lcs...release-notes/
==============

The Microsoft Dynamics Lifecycle Services (LCS) team is happy to announce the immediate availability of the release notes for LCS (October 2018, release 2).   Updates to the Performance troubleshooting tool in Lifecycle Services We have made some improvements to the performance troubleshooting tools available under SQL Insights in the Environment Monitoring dashboard in LCS:...

Источник: https://blogs.msdn.microsoft.com/lcs...release-notes/

crmtipoftheday: Tip #1183: Templates are not working after upgrade

$
0
0
Источник: https://crmtipoftheday.com/1183/temp...after-upgrade/
==============

Release 9.1.X (the coveted October release) is already here and some organizations have already been upgraded to the new version. Steve “Mr SMB” Mordue was, for a change, on the receiving end, as his customers complained that Word templates stopped working after the upgrade. When a template is selected from a record, new shiny Dynamics UI says it is creating, the spinning dialog eventually stops, but then nothing happens and nothing gets created. Steve tried clearing cache, and re-uploading template with a new name, no luck.

Turns out, SharePoint integration was throwing a spanner into the shiny October mag wheels. When downloading your template, make sure the two highlighted SharePoint relationships are not selected.



After that, both Word and Excel templates work like a charm. To the extent they can charm anyone, of course.

The relationships on the screenshot are for the opportunity, you’d want to exclude similar ones when using a different document-enabled entity.

(Facebook and Twitter cover photo by rawpixel on Unsplash)





Источник: https://crmtipoftheday.com/1183/temp...after-upgrade/

powerobjects: Experience The Cloud With PowerObjects – D365UG Summit 2018 [VIDEO]

$
0
0
Источник: https://www.powerobjects.com/2018/10...g-summit-2018/
==============


A few weeks ago, PowerObjects enjoyed the distinct honor of being a Premier Sponsor at Dynamics Communities’ Dynamics 365 User Group Summit in Phoenix. We had a great time chatting with existing clients, meeting prospective clients, and sharing knowledge and insights with colleagues, partners, and users from all over the globe. The annual Summit always makes for an exhausting week, but it is also incredibly rewarding, and this year was no exception. In addition to sponsoring the event, running the PowerObjects booth, talking to literally thousands of people, sharing our own journey to the cloud, and handing out tons of swag, the 21 PowerObjects team members hosted several workshops, demonstrated for crowds large and small the power and potential of Microsoft Business Applications, and showcased tons of the creative ingenuity for which we’re known. Please enjoy this video recap of our week in Phoenix!



Источник: https://www.powerobjects.com/2018/10...g-summit-2018/

everythingdynamicsaxbi: October ’18 release for Dynamics 365 for Finance and Operations

$
0
0
Источник: http://www.everythingdynamicsaxbi.co...nd-operations/
==============

The October ’18 release packed a lot of new features for Dynamics 365 for Finance and Operations. There’s been some design changes to the client, but also some new features in the embedded Power BI experience inside the Dynamics 365F&O client. Let’s take a look!

Design changes

The general design of forms and the navigation pane has gotten a cleaner look and personally I think this is a step in the right direction. It gives a whole better feel to the client and the overall user experience. It reminds me a bit of the design in Windows 10 at the moment, and maybe that’s what Microsoft are trying to do here.

First off is the homepage. There are some changes to the calendar font thickness(Month and year is now in bold) and there are more defined boxes to separate the different workspaces with a smaller font.

Application release 8.0 – Platform release 15 to the left and Application release 8.1 – Platform release 20 to the rightOn the forms there’s a new design on the navigation bar:

Application release 8.0 – Platform release 15 to the left and Application release 8.1 – Platform release 20 to the rightThe details form also has a new look:

Application release 8.0 – Platform release 15 to the left and Application release 8.1 – Platform release 20 to the rightNew in this version is the Add and Hide columns functionality which lets you easily add and hide columns on a list page without going into the form designer.

Application release 8.0 – Platform release 15 to the left and Application release 8.1 – Platform release 20 to the rightAlso when going into the new Add columns functionality you can create a new field which was introduced in a previous version:



Power BI Embedded

One other thing that is new and probably the most awesome thing in this release from my point of view is that you now can edit Power BI Embedded Analytics content directly in the client. Go to the Options tab of any workspace that contains Power BI Embedded Analytics and press Edit report Analytics – all companies:



That will take you into edit mode and you get access to all the same editing functionality as you would when you are editing Power BI Reports in the Power BI Service (Add new fields, change visualizations, add/change filters etc):



You can also add new pages to your report and create a whole new report based on the existing dataset:





I’m really looking forward to test this new functionality more in depth, but I like what Microsoft has done with D365FO for this update.

Any questions or comments feel free to reach out to me on email or via the comment section below.

That’s it for now, cheers!



Источник: http://www.everythingdynamicsaxbi.co...nd-operations/

yetanotherdynamicsaxblog: Upgrade from 7.x to 8.+ series | Post 2 | Deploy Dev and Grab source DB

$
0
0
Источник: http://yetanotherdynamicsaxblog.blog...es-post-2.html
==============

Introduction

In these series of posts. I will try to run you through the process of how you can complete the upgrade from 7.x to 8.+ of Dynamics 365 for Finance and Operations.

Quick navigation:
Upgrade from 7.x to 8.+ series | Post 1 | Start in LCS
Upgrade from 7.x to 8.+ series | Post 2 | Deploy Dev and Grab source DB (you are here)
Upgrade from 7.x to 8.+ series | Post 3 | Validate Code and Data in Dev
Upgrade from 7.x to 8.+ series | Post 4 | Setup a new Build
Upgrade from 7.x to 8.+ series | Post 4 | Upgrade Sandbox and finally Production


Deploy 8.x environments



You will need to deploy new environments. There is no "in-place" upgrade of your existing environments. The new environments will be on the version you are upgrading to. Fortunately, deploying new environments is easy to do through Lifecycle Services (LCS). You will need a decent Development VM to connect to the upgraded metadata, and check the code for any issues.

I typically go for a DS13v2 which has local SSD. I normally give it 14 disks of size 48GB, which will all be striped for maximum throughput. This has served me well so far. I don't chose premium storage, but go for standard storage. There are probably lots of preference out there, and I'm more than willing to learn from the community what they recommend.

Make sure the VM is hosted on your own (or customers) Azure Subscription. This way you are guaranteed to get local admin user. Also make sure the topology is Development. Pick an empty database, as you won't need that Contoso data for what we're about to do.

Prepare Database

While the Development VM is deploying, here's another neat thing you can do, if you haven't already done so. Setup a cloud Storage Account in the Azure Subscription. It can be a cheap Standard Storage (general purpose v2) type, with only Local Redundancy, on a Cold Tier - nothing fancy. Create yourself a blob storage where you can put the database which you will get from your source environment. If you haven't done this in Azure Portal before, let this be your first time. Things to consider; the Storage Account name must be unique (for that specific Azure Region). But you're a good citizen, and always used a good naming practice, right?

You will need three things from this cloud storage:
  1. The Storage Account Name
  2. The name of the blob storage
  3. The Access Key (which is found on the Azure Blade - look for the yellow key icon).
When you have the storage account ready, I bet the deploying of the Development VM is still spinning, so let's prepare a backup of the source database. We will use it to validate the upgrade. This is just a test, to make sure the upgrade experience will be smooth.

Head over to your Sandbox (Tier2) AOS, and extract the database from there. If you want to test on a fresh copy from Production, you will have to get Microsoft to do a Database Refresh first. But let's assume the one on the Sandbox is fresh enough.

The possibly quickest and easiest way to get the database extracted, at the point of writing, and while we are waiting on Microsoft to get the tooling in place in LCS, is to use the community driven D365FO.tools PowerShell Library.

Install the library on the AOS server using the following command. You'll have to click "Yes" and "Yes to all" on any questions.

Install-Module d365fo.tools
Then run the following to extract the database. It basically prepares a bacpac with the "_adhoc"-suffix, and saves it do the D-drive.

Import-Module d365fo.tools

$dbsettings = Get-D365DatabaseAccess

$baseParams = @{
DatabaseServer = $dbsettings.DbServer
SqlUser = 'sqladmin'
SqlPwd = 'SQLADMIN_PASSWORD_FROM_LCS'
Verbose = $true
}
$params = $baseParams + @{
ExportModeTier2 = $true
DatabaseName = $dbsettings.Database
NewDatabaseName = $($dbsettings.Database + '_adhoc')
BacpacFile = 'D:\Backup\sandbox_adhoc.bacpac'
}

Remove-D365Database @baseParams -DatabaseName $($params.NewDatabaseName)
New-D365Bacpac @params

Then using the cloud storage you've hopefully prepared, lets upload the bacpac to the cloud. We will later download it to the development VM.

Import-Module d365fo.tools

$params = @{
AccountID = 'STORAGE_ACCOUNT_NAME'
AccessToken = 'LONG_AND_SECRET_ACCESS_KEY_FOUND_ON_THE_STORAGE_ACCOUNT_IN_THE_AZURE_PORTAL'
Blobname = 'NAME_OF_THE_BLOB'
FilePath = 'D:\Backup\sandbox_adhoc.bacpac'
DeleteOnUpload = $false
}

Invoke-D365AzureStorageUpload @params

The database extract in form of a bacpac now awaits in the cloud storage, and when the development VM is ready, you can use the same PowerShell Library to download it and install it on your development VM.

But first, you need to make sure the application actually builds. I will address that in the next post.




Источник: http://yetanotherdynamicsaxblog.blog...es-post-2.html

yetanotherdynamicsaxblog: Upgrade from 7.x to 8.+ series | Post 3 | Validate Code and Data in Dev

$
0
0
Источник: http://yetanotherdynamicsaxblog.blog...es-post-3.html
==============

Introduction

In these series of posts. I will try to run you through the process of how you can complete the upgrade from 7.x to 8.+ of Dynamics 365 for Finance and Operations.

Quick navigation:
Upgrade from 7.x to 8.+ series | Post 1 | Start in LCS
Upgrade from 7.x to 8.+ series | Post 2 | Deploy Dev and Grab source DB
Upgrade from 7.x to 8.+ series | Post 3 | Validate Code and Data in Dev (you are here)
Upgrade from 7.x to 8.+ series | Post 4 | Setup a new Build
Upgrade from 7.x to 8.+ series | Post 4 | Upgrade Sandbox and finally Production
Connect to code

Given the code upgrade is completed in LCS, a process that shouldn't take many hours, and the Development VM is published, you can connect the local PackageLocalDirectory to the branch folder holding the "release".

Open Visual Studio, Connect to the Azure DevOps (VSTS) account and the right project, and then map your workspace to the "release". Notice I point the Metadata folder under the release to my local PackageLocalDirectory.



Let's have a quick look at the result from the Code Upgrade process. Like I wrote in the first post, the upgrade removes Microsoft hotfixes, but keeps any other custom packages and modules.

Put another way, the code upgrade will first copy your source metadata, then remove Microsofts modules, and it will sort of look a little bit like this.



If you were to take one of your existing development VMs and connect to the "release" branch folder and run a "Get Latest", the exact same steps would happen on your machine; you would see all the Microsoft Standard Module files be deleted under your PackageLocalDirectory. DON'T DO IT!

You may wonder why that doesn't happen on the new development VM. Well, since the Workspace you have just created on the new VM was created after the cleanup of the upgraded branch, nothing gets deleted locally when you run "Get Latest" on the new "release" branch folder.

So next you basically will have to make sure your application builds and works as expected - before you can continue.
Upgrade the Data

When you application is 8.+, you can go ahead and get the 7.x database and upgrade it on this development environment. This process should reveal any possible technical issues of sorts.

Let's first download the database to the VM from the cloud storage mentioned on post 2. You can either use Microsoft Azure Explorer or use the community driven PowerShell library d365fo.tools, like this.

Import-Module d365fo.tools

$dbsettings = Get-D365DatabaseAccess

$params = @{
AccountID = 'STORAGE_ACCOUNT_NAME'
AccessToken = 'LONG_AND_SECRET_ACCESS_KEY_FOUND_ON_THE_STORAGE_ACCOUNT_IN_THE_AZURE_PORTAL'
Blobname = 'NAME_OF_THE_BLOB'
Path = 'D:\Backup\'
FileName = 'D:\Backup\sandbox_adhoc.bacpac'
}

Invoke-D365AzureStorageDownload @params

With the database extract (bacpac), you will have to import it, overwriting the existing AxDB. There are a few gotchas when doing this, and you can either do it manually, following the guide on docs, or you can again use the PowerShell library d365.tools to help you out:

Import-Module d365fo.tools

$bacpacFile = 'D:\Backup\sandbox_adhoc.bacpac'
$sourceDatabaseName = "AxDB_Source_$(Get-Date -UFormat "%y%m%d%H%M")"

#Remove any old temp source DB
Remove-D365Database -DatabaseName $sourceDatabaseName -Verbose

#Stop local environment components
Stop-D365Environment -All

# Import the bacpac to local SQL Server
Import-D365Bacpac -ImportModeTier1 -BacpacFile $bacpacFile -NewDatabaseName $sourceDatabaseName -Verbose

#Remove any old AxDB backup (if exists)
Remove-D365Database -DatabaseName 'AxDB_original' -Verbose

#Switch AxDB with source DB
Switch-D365ActiveDatabase -DatabaseName 'AxDB' -NewDatabaseName $sourceDatabaseName -Verbose

Start-D365Environment -All

The script above does several things, like importing the bacpac and replacing the existing AxDB with the imported database. The whole process may take quite some time, because the bacpac import is a slow process. Also, the actual mdf and ldf file for the AxDB will have a date and timestamp, making it unique for each time you import - if you need to do it more than once.

When the database is imported, you will need to head back to LCS and apply the Software Deployable Package created by Microsoft specifically for doing the DataUpgrade. This process will also take some time, but at the end of it, you will have an upgraded database. The package is named DataUpgrade-81 and if you look at its description, it is one single package that upgrades the database from any previous 7.x version to 8.1.



In the next post, I will show one possible way to prepare your new build for 8+, which is a necessity before you can continue with updating your Sandbox and later your Production.



Источник: http://yetanotherdynamicsaxblog.blog...es-post-3.html

yetanotherdynamicsaxblog: Upgrade from 7.x to 8.+ series | Post 4 | Setup a new Build

$
0
0
Источник: http://yetanotherdynamicsaxblog.blog...es-post-4.html
==============

Introduction

In these series of posts. I will try to run you through the process of how you can complete the upgrade from 7.x to 8.+ of Dynamics 365 for Finance and Operations.

Quick navigation:
Upgrade from 7.x to 8.+ series | Post 1 | Start in LCS
Upgrade from 7.x to 8.+ series | Post 2 | Deploy Dev and Grab source DB
Upgrade from 7.x to 8.+ series | Post 3 | Validate Code and Data in Dev
Upgrade from 7.x to 8.+ series | Post 4 | Setup a new Build (you are here)
Upgrade from 7.x to 8.+ series | Post 4 | Upgrade Sandbox and finally Production
Some preparations before deploying Build VM

Basically, what we want to do is to have the new 8+ branch the build environment will pull code from. Beyond that you may want to have additional development branch to isolate ongoing development in the future, but I've left that out of the scope of this article.
If you've read the previous posts, you know the Code Upgrade in LCS created a "release" branch folder with a prepared upgraded application, and given that you've completed the code upgrade and validation as mentioned in the previous post, you should now be able to copy the result over to a new main branch for 8+.

The flow can be displayed sort of like this:


Now, obviously you're most likely going to delete/remove the old main branch and possibly also the "release" branch in the future. But the flow above can still be achieved. There are many ways to actually do this, and some have very strong opinions on how to branch the source.

You can easily create a new main branch by using the prepared "release" as source. You can do this using Source Code Explorer inside of Visual Studio running on your development VM.



You will simply give the new branch a unique name, separating it from the old main.


The name of the branch can actually be changed later, if that bothers you. However, we will deploy a Build environment later, and this will create a Build definition that needs the branch name to be correct - or the build definition will not work.

Don't forget, your changes locally on the VM will need to be committed to Azure DevOps (VSTS).



Another thing we will want to do is to create ourselves an isolated Agent Pool in Azure DevOps (VSTS). We want to make sure only 8+ build agents are in this pool of agents. You will need at least one, but who knows if you will add more in the future.

You will need some permissions in Azure DevOps (VSTS) to create this, but start at the Organization level and create a new Pool. I named it D365FO81 (since it will be used for 8.1.x). I have lots of projects not related to Dynamics, so I didn't want to push the agent pool to all projects.



I then opened the Project itself and added the Agent Pool to the project.


Deploy Build VM

Now, we are ready to head back to LCS and deploy a Build VM. And with the preparation above, we can fill out the VSTS-part like this, and it will make sure to put the build agent on the right pool, plus make sure the deployed build defintion points to the right branch.



Select the correct topology, and if you're deploying this on a private/self hosted Azure Subscription, you can chose a setup with DS13v2 and 14 standard disks of size 64GB. Again, leaning on the community here to learn what they recommend. These things change over time, and I can't promise I'll get back to this post and update it.

If you deleted the existing MS Hosted build environment, and deploy a new MS Hosted, you won't get any options to decide on VM size or disk setup.



Notice I fill in the name of the Agent Pool and the name of the branch. I also give the agent a unique name.

It will take quite some time before the Build environment is up and running. When it is, you will go ahead and schedule a build on the new Build Definition. The job will be picked up by the right Agent Pool, and then picked up by the agent sitting on the Build VM.

When the Build is complete, make sure to upload the Deployable Package to the LCS Asset Library. You will need it for the final post.




Источник: http://yetanotherdynamicsaxblog.blog...es-post-4.html

yetanotherdynamicsaxblog: Upgrade from 7.x to 8.+ series | Post 5 | Upgrade Sandbox and finally Production

$
0
0
Источник: http://yetanotherdynamicsaxblog.blog...es-post-5.html
==============

Introduction

In these series of posts. I will try to run you through the process of how you can complete the upgrade from 7.x to 8.+ of Dynamics 365 for Finance and Operations.

Quick navigation:
Upgrade from 7.x to 8.+ series | Post 1 | Start in LCS
Upgrade from 7.x to 8.+ series | Post 2 | Deploy Dev and Grab source DB
Upgrade from 7.x to 8.+ series | Post 3 | Validate Code and Data in Dev
Upgrade from 7.x to 8.+ series | Post 4 | Setup a new Build
Upgrade from 7.x to 8.+ series | Post 4 | Upgrade Sandbox and finally Production (you are here)
Prepare a sandbox upgrade for validation

Before you can go ahead and request an upgrade of Production, you will want to do a pre-production validation in the sandbox environment. You may read the details here:
https://docs.microsoft.com/en-us/dyn...ox-environment

The actual steps are well documented here:
https://docs.microsoft.com/en-us/dyn...ox-environment

Before you start this process, you will want to make sure you have the following uploaded to LCS Asset Library:
  • Upgraded application (Software Deployable Package), downloaded from the successfull build.
  • Backup of source database as bacpac. If you need a fresh backup from Production, this is the time to get one. Use the scripts from previous posts to extract a bacpac, if necessary.
If you've followed the previous posts. you should by now have this ready.


The next steps are simply:
  1. Redeploy sandbox with target version. Make sure to select the upgraded application package. If you don't, you will have to install it afterwards, before you continue to the next step.
  2. Import the bacpac from the source. Here you can use the tooling in LCS.
  3. Run the DatabaseUpgrade-81 package.
Then you can let the users start hammering on the system to potentially discover everything is flawless (knock on wood).
Finally Production

When you are ready to do the actual upgrade of Production, the flow is a lot simpler, and very well outlined on the official documentation. So I will simple refer to docs here.



Good luck!

Источник: http://yetanotherdynamicsaxblog.blog...es-post-5.html

dkatson: What I learned from #DirectionsEMEA


Приведение типов в Axapta

$
0
0
Собственно проблема:
Axapta 2009, .NET 3.5 в ней отсутствует SecurityProtocolType::TLS12,
на c# это можно обойти через приведение типов:

Код:

ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
Возможно ли сделать тоже самое в Аксапте? Без этого сторонний сервер не хочет принимать запрос..

X++:

System.Net.ServicePointManager::set_SecurityProtocol(System.Net.SecurityProtocolType::TLS12);

список объектов из перекрестных ссылок

$
0
0
ax2009
добрый день
задачка:
есть список№1 объектов (AOT или проекта или AOTа,начинающихся на "prefix" )
необходимо создать список№2 объектов (опционально без дубликатов), которые являются результатом отработки процедуры "Чем используются"
список№2 в любом виде, хоть в текстовом

Нав 2018 шаблоны ролей

$
0
0
Всем добрый день!

В НОВОМ :) Наве роли настраиваются как в старом: т.е. каждому логину вручную добавляются 20-30 ролей?

Или есть что-нибудь типа шаблонов?

Спасибо.

d365technext: How to get Vendors or Customer Contact Information

$
0
0
Источник: http://d365technext.blogspot.com/201...r-contact.html
==============




How to get Vendors or Customer Contact Information

Via below code you can get the Vendor/Customer complete contact information.

Important
In AX 2012 PrimaryContactLinkedIn & PrimaryContactFacebook fields are not available.

classSLD_DemoInstance
{

publicstaticvoid main(Args _args)
{


LogisticsElectronicAddresslogisticsElectronicAddress;
DirPartyTable dirPartyTable=DirPartyTable::findRec(VendTable::find("K-DR-000001").Party);

whileselect logisticsElectronicAddress where (logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactEmail ||
logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactPhone || logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactFacebook ||
logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactFax || logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactLinkedIn)


{
info(strFmt("%1",logisticsElectronicAddress.Description));
}
}



}






Источник: http://d365technext.blogspot.com/201...r-contact.html

dynamicsax-fico: Reserves for bad debt

$
0
0
Источник: https://dynamicsax-fico.com/2018/11/...-for-bad-debt/
==============

This webcast shows how you can calculate, create and post reserves for bad debt in MSDyn365FO.
Recording bad debt reserves was always an area that required costly system modifications in previous Dynamics versions. With MSDyn365FO you do not need to spend money for that but can rather make use of the full Microsoft business solution power to get bad debt reserves incorporated in the standard application without writing a single line of code.







Источник: https://dynamicsax-fico.com/2018/11/...-for-bad-debt/
Viewing all 14618 articles
Browse latest View live