AXForum  
Вернуться   AXForum > Блоги > Logger
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

  1. Старый комментарий
    Запись от Logger размещена 30.12.2020 в 11:34 Logger is offline
    Обновил(-а) Logger 30.12.2020 в 11:50
  2. Старый комментарий
    Запись от Logger размещена 30.12.2020 в 11:25 Logger is offline
  3. Старый комментарий
    Запись от Logger размещена 01.12.2020 в 16:39 Logger is offline
    Обновил(-а) Logger 30.12.2020 в 11:32
  4. Старый комментарий
    Запись от Logger размещена 09.11.2020 в 11:48 Logger is offline
    Обновил(-а) Logger 09.11.2020 в 11:51
  5. Старый комментарий

    Разное интересное чтобы не забыть

    https://fix.lcs.dynamics.com/Issue/D...f7ee4807fb7fba

    Issue 3977147 - Resolved
    Role for Invoice Journals in EP
    Product and version: AX 2012 R3
    KB number: 4343204
    Fix type: Application update
    Released Date: 7/10/2018
    PROBLEM
    In sales Module in EP, while accessing EP with Test User who is having System user, Employee user, Account Receivable Role, Then User is not able to access the Invoice Journal option for Sales Orders in Enterprise Portal.

    Actual Result:

    DESCRIPTION OF CHANGE
    The changes in the hotfix make sure that User with Role Accounts Receivable Clerk Role will be able to access Invoice journal on EP.
    Запись от Logger размещена 22.09.2020 в 14:46 Logger is offline
  6. Старый комментарий

    Разное интересное чтобы не забыть

    https://fix.lcs.dynamics.com/Issue/D...d2322b3f73ce01

    Solution 709488Installation Enterprise Portal
    Product and version: AX 2012 R2
    PROBLEM
    Partner is unable to install EP as they are receiving an error message "Error: The Website 'http://xxxxxxx/websites/DynamicsAx' wasn't created properly. The Remote server reported an error: (500) Internal Server error"
    MITIGATION
    The following steps have been taken to resolve the issue:1) Verify if you have SQL rights to the SharePoint config database, if NO assign these rights and then try installing again.2) Empty out the AX business connector proxy account from AX client | System administration | System | System service accounts.3) Delete AXSiteDef folder from C:\Program Files\Common Files\Microsoft shared\Web Server Extensions\14\Template\1033 AND C:\Program Files\Common Files\Microsoft shared\Web Server Extensions\14\Template\SiteTemplates• C:\Program Files\Common Files\Microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ep Folder • Delete C:\Program Files\Common Files\Microsoft shared\Web Server Extensions\14\Template\Features\Dynamics* folders • Delete the files starting with Dynamics* from C:\Program Files\Common Files\Microsoft shared\Web server extensions\144) While installing the EP, install it without creating the site. Then check to make sure the above deleted files got re-created including the EP folder that was not there. Then run the EP install again to create the site again.
    Запись от Logger размещена 22.09.2020 в 14:45 Logger is offline
  7. Старый комментарий

    Разное интересное чтобы не забыть

    In Dynamics AX 2012, when you open the forms, you might see some of them open behind the other forms. User may get the impression that the form was never opened. This happens if the form opened slowly; a cold start, uniqueness of the data including large number of records or complexity of the form may cause the form to load up slowly. The form hide behind the other form because of Windows’s ‘ForegroundLockTimeout’.

    Doing the following changes to your system could fix this issue. Since it involves changing a registry key in your system, take necessary precautions.

    Create a Restore point before performing the steps below as a precaution.

    http://windows.microsoft.com/en-US/w...-restore-point

    Steps:

    1. Open registry>> Start>>Type regedit>>press enter.

    2. Locate the key:

    HKEY_CURRENT_USER\Control Panel\Desktop

    3. On the right pane right click on the following key and select modify:

    4. ForegroundLockTimeout

    5. Select Base as decimal and then type 0 (zero) in the value data box and click on Ok.

    6. Exit from registry and restart the computer.

    REGISTRY EDIT DISCLAIMER:

    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

    322756 How to back up and restore the registry in Windows
    Запись от Logger размещена 22.09.2020 в 14:44 Logger is offline
  8. Старый комментарий

    Разное интересное чтобы не забыть

    Solution 742836Focus issues with AX client running RemoteApp
    Product and version: AX 2012 R2
    PROBLEM
    Environment has 2 clustered Windows 2008 R2 Terminal server where the AX client is exposed as Remote App.The Users are accessing the AX client using different OS. (Windows XP SP3, or Windows 7 SP1).The problem they get is that sometimes when form/lookup is opened it goes to background and the user needs to with ALT+TAB search the right form to bring it to the front.
    MITIGATION
    Within the link below the AX performance team blogged about it for AX 2012 users. The provided solution however (which applied to AX 2009 too) is identical to the one from the blog you found and changing the “ForegroundLockTimeout” registry key. Dynamics AX 2012: Forms on opening hide behind in the backhttp://blogs.msdn.com/b/axperf/archive/2012/02/09/dynamics-ax-2012-forms-on-opening-hide-behind-in-the-back.aspx As per the TechNet blogs below the “ForegroundLockTimeout” specifies the time, following user input, during which the system keeps applications from moving into the foreground automatically (without selection by the user). The “ForegroundFlashCount” specifies the number of times the taskbar button flashes to notify the user that the system has activated a background window. If the time elapsed since the last user input exceeds the value of the ForegroundLockTimeout entry, the window will automatically be brought to the foreground. * ForegroundLockTimeouthttp://technet.microsoft.com/en-us/library/cc785645(v=ws.10).aspx * ForegroundFlashCounthttp://technet.microsoft.com/en-us/library/cc758292(WS.10).aspx Through combining these two keys a clear indication to the user can be realized. The ForegroundFlashCount setting indeed does little more than set the time the picture on the taskbar is flashing once the program/form is started in the background. For windows 2008 and 2008 R2 Remote desktop service (RDS) a number of hotfixes are released (see articles below) specify for “Remote App” there are a number of fixes where windows do not show properly and/or show in the background. * 2312539 Available Updates for Terminal Services (Remote Desktop Services) in Windows Server 2008http://support.microsoft.com/default.aspx?scid=kb;EN-US;2312539 * 2699817: http://support.microsoft.com/kb/2699817 * 2696020: http://support.microsoft.com/kb/2696020Important steps to check: * Verify the location of the ForegroundLockTimeout and ForegroundFlashCount registry values to be at “HKEY_CURRENT_USER\Control Panel\Desktop” and not in “HKLM:” * Verify the type of values both to be REG_DWORD * Verify the machine has been rebooted to get the values to get effective. * If you have the language bar activated, please switch it off for a Test. * Another thing to check is that, and it happens very often, the Regkey is not set properly. For example what often happen is that they copy and paste it and unfortunately they copy a blank space with it. In this case the complete Regkey didn’t work proper. So maybe exporting the Regkey and check it.
    Запись от Logger размещена 20.09.2020 в 16:07 Logger is offline
  9. Старый комментарий
    Запись от Logger размещена 27.08.2020 в 18:04 Logger is offline
  10. Старый комментарий
    Запись от Logger размещена 14.08.2020 в 13:25 Logger is offline
  11. Старый комментарий
    Запись от Logger размещена 07.02.2020 в 09:49 Logger is offline
  12. Старый комментарий

    Разное интересное чтобы не забыть

    https://m.habr.com/ru/post/466941/?f...XzadJp_8Je_TlE

    Почему для открытия меню Windows читает один файл сто тысяч раз?
    Запись от Logger размещена 04.02.2020 в 22:28 Logger is offline
  13. Старый комментарий
    Запись от Logger размещена 29.11.2019 в 20:22 Logger is offline
  14. Старый комментарий

    Разное интересное чтобы не забыть

    https://blog.it-kb.ru/2014/04/15/ins...language-pack/

    Установка и базовая настройка SharePoint Server 2013 SP1 на Windows Server 2012 R2 (в топологии Two-tier farm). Часть 2 – Установка SharePoint (Создание фермы)
    Запись от Logger размещена 29.11.2019 в 19:49 Logger is offline
  15. Старый комментарий
    Запись от Logger размещена 29.11.2019 в 19:31 Logger is offline
  16. Старый комментарий
    Запись от Logger размещена 29.11.2019 в 19:26 Logger is offline
  17. Старый комментарий

    Разное интересное чтобы не забыть

    https://blogs.msdn.microsoft.com/sol...-while-saving/

    64bit machine – VS EP add-in not deploying user control to SharePoint while saving

    In 32 bit machine, when you edit an user control in VS using EP add-it, it automatically uploads the saved file to both AOT and to SharePoint (“%SYSTEM Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\ep" folder on the web server)


    If you are using 64 bit machine for EP, make sure getSharepointTemplatePath method of SysEPDeployment class in AOT has the below code . This is needed so that whenever you save user controls in VS, that will automatically be deployed to the EP server same as in 32 bit env.


    public static str getSharepointTemplatePath()
    {
    str templatePath ='';
    ;
    templatePath =SysEPDeployment::getSharepointTemplatePathDotNet();
    return templatePath? templatePath:SysEPDeployment::getSharepointTemplatePathWin32();






    Thanks to John Hermsen from Giant Bicycles for providing a similar workaround.


    (2) If you are making change to user controls in Visual studio, then there are no additional steps to have these changes propagated to the EP Server. Whenever you make changes on already existing user control in VS, it will automatically copy it to the SharePoint folder location. If you are creating new user control, when you add it to AOT by the right click menu and save the control in VS, it will automatically copy it to the SharePoint location.


    (3) If you are making changes to Tables/EDTs/Enums/Data Sets/Classes, then you need to click the “Refresh AOD” link available to the administrators in the EP home site quick launch. This will clear the metadata cache. You can also do an “iisreset” if needed


    If you are making change to proxy file/static files/resources, then you need to deploy them. User AxUpdatePortal utility http://msdn.microsoft.com/en-us/library/dd261467.aspx (Manage Deployment Option does not work in 64 bit machines,so you have to use AXUpdatePortal)

    Tags Deployment
    Comments (6)
    Tutoo
    January 15, 2010 at 1:41 am
    Hi Mey,

    We are working on EP & SSRS. We are not able to find the right way of passing parametrs from EP to SSRS reports ie: generate a report based upon the current record selected in an AXGrid control.

    Please provide some solution.

    player
    March 5, 2010 at 11:36 pm
    could be the ability to specify report parameters through the URL.

    This can be done by using the parameter selector in the report webpart and appending the URL with “<parameterSelector>.ParamName=value”

    IT Outsourcing
    March 28, 2010 at 10:58 pm
    Hey that’s very good point but I am a bit confused on the 2nd point that is making change to user controls in Visual studio, then there are no additional steps to have these changes propagated to the EP Server. Is it really?

    Tutoo
    June 21, 2010 at 3:01 am
    @ player

    Thanks for the comment.

    Can you please elaborate a bit more ? How we are going to do it programatically.

    Like with X++/ classic client we can use menufunction and pass parameters directly to SSRS reports, how we can achieve the same with EP?

    Tutoo
    June 21, 2010 at 3:01 am
    @ player

    Thanks for the comment.

    Can you please elaborate a bit more ? How we are going to do it programatically.

    Like with X++/ classic client we can use menufunction and pass parameters directly to SSRS reports, how we can achieve the same with EP?

    Another point how we will achive this in a multi param scenario…

    summer
    October 24, 2010 at 5:36 am
    This is an excellent article, thank you very much for it, I have found here much useful information in http://spidesk.ru
    Запись от Logger размещена 29.11.2019 в 19:22 Logger is offline
  18. Старый комментарий
    Запись от Logger размещена 03.09.2019 в 14:53 Logger is offline
  19. Старый комментарий
    Запись от Logger размещена 09.06.2019 в 23:32 Logger is offline
  20. Старый комментарий

    X++, the catch Michael Fruergaard Pontoppidan November 24, 2016

    Velislav M
    November 29, 2016 at 9:03 am
    Not a fan of compiler magic, but this is an example of how syntax sugar makes us fat and lazy. Can we have some more, please!
    We already know what the correct “catch-all” block should look like…
    So, why can’t we have a keyword that automatically emits all the boilerplate code for handling correctly the update-conflict and duplicate-key exceptions?

    I mean, going forwrad, it would be nice if we could write code that can be fully covered by unit tests without too much hassle.
    And creating a macro, or a separate class, for just handling transaction exceptions is simply not as good.
    Sometimes, more control will be needed, but most of the time people will be just fine with a “smart default”

    Log in to Reply
    Logger
    November 25, 2016 at 3:33 pm
    Michael, I believe that it is necessary to fix the core.

    Correction in X ++ code has a number of problems:
    1. Not all developers know about the bug discussed and probably will never know. (Moreover, few people know ). It is therefore not correct to be a bug. The bug will remain forever. For example, I posted information about it on axforum in 2011, but so far very few people know about it in Russia. (axforum – the only Russian-language resource on DAX)
    2. Most of the developers since Ax3, accustomed that the transaction is atomic and X ++ supports it (Acid). But this is not the case.
    3. Documentation X ++ explicitly recommends that you can use Exception- All. It is not enough to recommend the developers to correct the X ++ code. At the same time it is necessary to fix the system documentation.
    4. In reality, now the developer is forced to constantly think about the danger and cumbersome to write exception handling. This is extremely inconvenient and prevents focus on the essentials. X ++ in this case, – makes life difficult, not easier.
    5. Find all the places in the code that must be very difficult to correct. (They are still many standard code)

    In the case of kernel patches:
    1. Developers do not need to be aware of this bug and a lot of problems with uninformed programmers disappears.
    2. Acid still been supporting X ++. Software really gets what he expects and what it was used since ax3
    3. It is not necessary to correct the documentation – the system will start to work as well as recommended in the documentation.
    4. Exception handling code is again very simple. There is no need to think about the complex. (This is the main reason. Most developers will simply be happy by this simplification.)
    5. Do not look for a lot of places in the code X ++ to fix. It is enough to put a fix for the kernel! I think you will agree that it is much easier than to review and analyze all of the source X ++ code. In addition, a bug often works, But users and programmers do not notice it. For them, the situation looks like in the middle of a transaction to commit. Now all is corrected itself.

    And further:
    I do not know the kernel source code, but I think that to correct the mistake would not be very difficult as the kernel, when exiting ttsBegin/ttsCommit scope – changes ttslevel, ie kernel monitors the level of the transaction. I think that we should not reduce the tts-counter by 1, but the transaction counter is to be reseted to 0. It will be safer. (In this case, we do not renounce the TTSunrollbackable exceptions. Only fix their behavior)

    Log in to Reply
    Metin Emre
    November 28, 2016 at 4:57 pm
    Logger,

    I think this’s not a bug. first record saved, while second is saving there’s an error occurs and you decided what’ll do in catch. You can ignore the bug, or you can throw an error and break the transcaction. That’s logical. However I never noticed this behaviour until today and in first a bit shocked.

    Thanks for article…

    Log in to Reply
    AGolubkov
    November 25, 2016 at 8:41 am
    thanks for post.
    It’s stupid core bug, as i see.
    That ‘trick’ don’t happens in old version of AX. I check it on AX4, and when raise UpdateConflict on the line of credit update, code goes to catch in postList method. And therefore, without any violation of transactional integrity.

    Log in to Reply
    Michael Fruergaard Pontoppidan
    November 25, 2016 at 9:09 am
    Thanks! That is very useful information. I’ve tried this in AX2012 R3 and AX7. Both have this problem. Does anyone have an AX2009 they can try on?

    Log in to Reply
    Logger
    November 25, 2016 at 12:49 pm
    I’ve tried in ax2009.
    Bug exists and caused some problem in production.

    I described this here
    Развалились InventSum - InventTrans

    Here is brief translation
    The job :
    static void Job791_15(Args _args)
    {
    #define.recIdTrans(5637151827) // here must be existsing recid from InventTrans.
    InventTrans InventTrans;
    InventSum InventSum;
    ;
    try
    {
    ttsBegin;
    try
    {
    InventTrans = InventTrans::findRecId(#recIdTrans, true);
    InventTrans.Qty += 1.0;
    InventTrans.Update();
    breakpoint;
    }
    catch
    {
    info(“Catched inner catch”);
    }
    ttsCommit;
    }
    catch
    {
    info(“Catched outer catch”);
    }

    info(strFMT(“InventTrans.RowCount() = %1, InventTrans.Qty = %2, InventSum : %3 “,
    InventTrans.RowCount(),
    InventTrans.Qty,
    con2str(Global::buf2Con(InventSum::find(InventTrans.ItemId, InventTrans.inventDimId)), “; “)
    ));

    }

    How to use:
    1. Edit job, setting in line 3 the recid of existing InventTrans.
    2. Open 2 ax client.
    3. Run the job on the first client and wait when it stops in debugger.
    4. Run the job on the second client and wait. Client must hang. It wil be blocked by first client.
    5. Press F5 in debugger for first client.
    6. Press F5 in debugger for second client.
    So, both jobs are to be performed.
    As result, InventTrans.Qty increases by 1.0 and the apropriate column in InventSum increases by 2.0

    Logger
    November 25, 2016 at 1:10 pm
    It can not be reproduced in ax3 because it does not support Exception::UpdateConflict and Exception:uplicateKeyException

    Michael Fruergaard Pontoppidan
    November 26, 2016 at 7:41 am
    Hi AGolubkov,
    What is the build number of AX4 you tried on? I looked at the compiler/interpreter code in AX4 vs AX2009 and found nothing indicating the behavior should be different.

    UPDATE: I tried on AX4SP1, it also has this problem. I’m going to assume this has been an issue since the new exception types got introduced.
    There is an image showing it here: https://msdnshared.blob.core.windows...buggingTTS.png

    Thanks
    Michael

    Log in to Reply
    AGolubkov
    February 2, 2017 at 8:33 am
    Hi Michael,
    sorry for late reply, I didn’t see your question.

    I’ve tried it on application Dynamics AX 4.0 SP2 4.0.2501.116, and hadn’t any problems with trasactional integrity in this example.
    https://drive.google.com/file/d/0B1U...ew?usp=sharing

    AGolubkov
    February 2, 2017 at 8:38 am
    Hi Michael,
    soryy for late reply, I didn’t see your question…

    I’ve tried this example in DAX application Dynamics AX 4.0 SP2 4.0.2501.116.
    And I didn’t see any problem with transactional integrity.
    https://drive.google.com/open?id=0B1...Dk4NnRRSm5lLUk

    Denis
    November 24, 2016 at 5:47 pm
    Nice post. Do you have any ideas how to find such ‘unsafe’ code in the existing application

    Log in to Reply
    Michael Fruergaard Pontoppidan
    November 24, 2016 at 7:12 pm
    Hi Denis, there are many ways to find them. As I had all source files on disk (I’m on the AX7 stack), I did a “findstr /i /s /C:”catch” *.* >catches.txt”. Then I used Notepad++ to filter out the noise. Within a few minutes I had the list of potential problems, and I then started the investigation in Visual Studio. There are other (and likely more efficient) ways – but this did the job for me.

    -Michael

    Log in to Reply
    Denis
    November 25, 2016 at 4:19 am
    By the way – can you register this issue as a bug?
    It seems more logical that the language should guarantee that what is written between ttsbegin.. ttscommit should be considered as one transaction, not just the way that developer write code

    Michael Fruergaard Pontoppidan
    November 25, 2016 at 9:13 am
    Let us assume this is a compiler bug, and it get resolved as a KB. How long will it take before all systems in the world are patched? Wouldn’t it be better to write code that is reliable with and without the fix. Another complicating factor is that all X++ must be recompiled for an eventual fix to have any effect. Rest assured the X++ compiler team is informed; and this thread will be updated with news.

    Logger
    November 29, 2016 at 1:36 pm
    Hi Michael.

    >> Never use catch “all” without explicitly catching updateConflict and duplicateKey exceptions.

    I suggest to create a BestPractice check, verifying before the code “Catch-ALL” is always exists “catch (Exception::UpdateConflict)” and “catch (Exception:uplicateKeyException)”

    What we get:
    1. There will be found all the places that need to be fixed, with the global compilation.
    2. If one uses Exception incorrectly, BP check warns programmer. So, code will be fixed immediatly.
    3. In the future, it will be easier to maintain the correct code.

    Martin Dráb
    November 24, 2016 at 3:55 pm
    A nice demonstration of an ugly problem.

    It also shows that X++ / AX lacks tools for developers to handle exceptions correctly – catch clauses in “What does reliable code look like?” take more than 30 lines. Also, X++ doesn’t have a statement for re-throwing the same exception (as throw; does in C#).

    There are also other issues with exception handling. If anybody can break my exception handling logic just by calling my method from inside a transaction, it means that I can’t really rely on it. Together with the fact that exceptions don’t carry additional details such as a type (something like FileNotFoundException) it leads to a complete absence of code for recovering from errors (people either let the process stop, or handle all exceptions, as in this post).

    Generics and better exceptions are my top two things I would like to see in X++.

    Log in to Reply
    Michael Fruergaard Pontoppidan
    November 24, 2016 at 7:23 pm
    Hi Martin, As this post points out, it is actually possible to handle exceptions in X++ correctly, and it is possible to write a method that cannot be broken by a consumer. My hope is that this post will enable X++ developers to do so.

    I do agree that handling of exceptions is much too hard and much too verbose in X++; and there is plenty of room for improvements.

    -Michael

    Log in to Reply
    Max
    November 25, 2016 at 11:19 pm
    So it is a bug in the core which is at least 5 years old and we have a solution now: “Just avoid holding it in that way”. Cheers

    Martin Dráb
    November 27, 2016 at 2:57 am
    Micheal, I mean that if I want, for example, all errors to be logged and then continue processing (or use any other arbitrary error handling logic), all my logic is ignored when somebody calls my logic from inside of another transaction.
    Your post doesn’t show how to address it and it can’t, because it’s not possible. Your post is clearly about exceptions that don’t have this problem, because they actually *can* be handled inside transactions.

    Michael Fruergaard Pontoppidan
    November 28, 2016 at 7:57 am
    Thanks for the elaboration, Martin. The original design of transaction and exception handling in AX was to ensure data integrity – at the cost of flexibility. Giving back the full flexibility as you are requesting without risking data integrity is an interesting challenge. (As this post shows).
    Запись от Logger размещена 03.06.2019 в 09:43 Logger is offline


Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 23:53.