<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>AXChina</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/axchina/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/axchina/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:30:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>从Visual Studio 2010中发布报表错误-”Loading this assembly would produce a different grant set from other instances“</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/visual-studio-2010-loading-this-assembly-would-produce-a-different-grant-set-from-other-instances</link>
      <pubDate>Tue, 22 Oct 2013 02:35:31 GMT</pubDate>
      <dc:creator><![CDATA[Clifford Zhang[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2013/10/22/visual-studio-2010-loading-this-assembly-would-produce-a-different-grant-set-from-other-instances/</guid>
      <description><![CDATA[&#160;  问题描述:  从Dynamics AX 2012 R2 的AOT / Visual Studio Projects/ 打开一个VS.NET...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p><strong>问题描述:</strong></p>  <p>从Dynamics AX 2012 R2 的AOT / Visual Studio Projects/ 打开一个VS.NET 报表项目，这样VS.NET就打开了，编译部署该报表报如下错误:</p>  <p>The &quot;GenerateRdlTask&quot; task failed unexpectedly.</p>  <p>System.IO.FileLoadException:<font style="background-color: #ffff00"> Loading this assembly would produce a different grant set from other instances</font>. (Exception from HRESULT: 0x80131401)</p>  <p>&#160;&#160; at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck)</p>  <p>&#160;&#160; at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)</p>  <p>&#160;&#160; at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)</p>  <p>&#160; at System.Activator.CreateInstance(Type type, Boolean nonPublic)</p>  <p>&#160;&#160; at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark&amp; stackMark)</p>  <p>&#160;&#160; at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)</p>  <p>&#160;&#160; at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark&amp; stackMark)</p>  <p>&#160;&#160; at System.Activator.CreateInstance(String assemblyName, String typeName)</p>  <p>&#160;&#160; at System.AppDomain.CreateInstance(String assemblyName, String typeName)</p>  <p>&#160;&#160; at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)</p>  <p>&#160;&#160; at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)</p>  <p>&#160;&#160; at <font style="background-color: #ffff00">Microsoft.Dynamics.Framework.Deployment.Reports.DomainBound.PrepareTask</font>(AppDomain tempAppDomain)</p>  <p>&#160;&#160; at Microsoft.Dynamics.Framework.Deployment.Reports.GenerateRdlTask.GetBusinessLogicAssemblyReferences(String assemblyPath)</p>  <p>&#160;&#160; at Microsoft.Dynamics.Framework.Deployment.Reports.GenerateRdlTask.Execute()</p>  <p>&#160;&#160; at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()</p>  <p>&#160;&#160; at Microsoft.Build.BackEnd.TaskBuilder.&lt;ExecuteInstantiatedTask&gt;d__20.MoveNext() C:\Program Files (x86)\MSBuild\Microsoft\DynamicsTools\Microsoft.Dynamics.Framework.Design.Reporting.Modeling.targets 103 6 FreeTextInvoiceReport</p>  <p>&#160;</p>  <p><strong>原因:</strong></p>  <p>“Loading this assembly would produce a different grant set from other instances”是一常见错误，从CLR角度来看是如下assembly 被加载到多个AppDomain中，而security context不同:</p>  <p>Microsoft.Dynamics.Framework.ReportsDeployment, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</p>  <p>AX 定制了一个单独的VS.NET project template, 在发布项目时候为了实现能够unload/load 会建立一个临时的AppDomain, 调用AppDomain.CreateIntanceAndUnWrap()执行 Microsoft.Dynamics.Framework.ReportsDeployment.dll中的类型：</p>  <p>Microsoft.Dynamics.Framework.Deployment.Reports.DomainBoundHelper</p>  <p>深层次的原因目前不清楚，目前只在一个客户那里发生该问题，无法在内部重现跟踪排错。</p>  <p>如果用Process Explore查看DevEnv.exe (VS.NET)加载的assembly, 可以看到Microsoft.Dynamics.Framework.ReportsDeployment.dll被加载到多个AppDomain中，包括Shared AppDomain. 但是Microsoft.Dynamics.Framework.ReportsDeployment.dll实际上是被安装到GAC里的，而且有强签名的，所以不应该会出现在多个AppDomain中的。</p>  <p><strong><font size="2">解决办法：</font></strong></p>  <p>目前来看可以采用如下办法绕过该问题:</p>  <p>设置操作系统级别的环境变量 COMPLUS_LoaderOptimization =1， 关于COMPLUS_LoaderOptimization 的说明参看</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3678.image_6D0E9B64.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3678.image_5F00_6D0E9B64.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3051.image_thumb_18DEEF54.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3051.image_5F00_thumb_5F00_18DEEF54.png" width="640" height="725" /></a></p>  <p><b>COMPLUS_LoaderOptimization Environment Variable</b></p>  <p><a href="http://msdn.microsoft.com/en-us/library/dn449122.aspx">http://msdn.microsoft.com/en-us/library/dn449122.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>AX 2012 R2 AIF: 如何找到已有的AIF service的artifacts?</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/ax-2012-r2-aif-aif-serviceartifacts</link>
      <pubDate>Mon, 23 Sep 2013 01:31:49 GMT</pubDate>
      <dc:creator><![CDATA[Clifford Zhang[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2013/09/23/ax-2012-r2-aif-aif-serviceartifacts/</guid>
      <description><![CDATA[如果我们需要新建AIF 服务，这个过程使用AIF Document Service Wizard 比较直观,...]]></description>
      <content:encoded><![CDATA[<p>如果我们需要新建AIF 服务，这个过程使用AIF Document Service Wizard 比较直观, 最后不仅会生成一个Axd的project，而且在运行Wizard结束的时候有个汇总页面让你清楚系统都生成了哪些AIF 的部件 (artifacts).</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1134.image_60D7D4B6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1134.image_5F00_60D7D4B6.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/5340.image_thumb_1DAC5689.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/5340.image_5F00_thumb_5F00_1DAC5689.png" width="676" height="530" /></a></p>  <p>有时候我们可能需要定制或者修改系统的逻辑。那么对于系统已经自带的标准AIF service, 如何反向找到那些artifacts呢？</p>  <p>1. 比如RetailStoreService AIF 服务, 首先在AOT里我们很容易找到其对应的AIF Service Class为RetailStoresService</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7271.image_281D04DC.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7271.image_5F00_281D04DC.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3835.image_thumb_3195C352.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3835.image_5F00_thumb_5F00_3195C352.png" width="574" height="332" /></a></p>  <p>根据定义该service class有方法实现service所定义的所有操作operations:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1727.image_63ACEDCF.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1727.image_5F00_63ACEDCF.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1526.image_thumb_5429DC00.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1526.image_5F00_thumb_5F00_5429DC00.png" width="573" height="356" /></a></p>  <p>2. 我们查看比如Read()方法，找到这些方法的参数就知道AifDocument class了:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/2158.image_6A9C7A87.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/2158.image_5F00_6A9C7A87.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3515.image_thumb_28B59539.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3515.image_5F00_thumb_5F00_28B59539.png" width="587" height="320" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/5633.image_262C637B.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/5633.image_5F00_262C637B.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/8637.image_thumb_0388%.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/8637.image_5F00_thumb_5F00_03882500.png" width="588" height="281" /></a></p>  <p>3. 查看Aif Document Class的方法，其方法用到的参数即为data container parameters.</p>          <p>4. 记下上述的AIF Document Class的 ID=1018077, 该类一定从AifDocument继承，然后使用如下的查询来找到Axd Document Class:</p>  <p>select DOCUMENTNAME,DOCUMENTCLASSID as AifDocumentClassId,SCHEMAROOTELEMENTTYPE as AxdDocumentClass,* from AIFSCHEMASTORE SS </p>  <p>inner join AIFDOCUMENTSCHEMATABLE ST</p>  <p>on SS.RECID=ST.SCHEMARECID and ST.DOCUMENTCLASSID=<em><font style="background-color: #ffff00">1018077</font></em></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/0272.image_00FEF342.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/0272.image_5F00_00FEF342.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1145.image_thumb_0CB43A74.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1145.image_5F00_thumb_5F00_0CB43A74.png" width="969" height="153" /></a></p>  <p>这样我们就得到了Axd Document Class=AxdRetailStores. </p>  <p>5. 如果该AxdRetailStores没有重载任何GetQueryName/GetQuery，那么对应的AX Query应该跟这个Axd Document Class同名:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/2642.image_0377FF33.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/2642.image_5F00_0377FF33.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1300.image_thumb_4FCF92D4.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1300.image_5F00_thumb_5F00_4FCF92D4.png" width="808" height="376" /></a></p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/4555.image_5EB6C1EE.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/4555.image_5F00_5EB6C1EE.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/6505.image_thumb_4ABD2F58.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/6505.image_5F00_thumb_5F00_4ABD2F58.png" width="750" height="396" /></a></p>  <p>6. 查看Axd Document Class的 成员函数，就能发现用到的AxBC class.</p>    <p>仿照如上步骤你可以试验得到<strong>RetailLoyaltyCustomerService</strong>的所有artifacts:</p>  <p>到这里我们有了如下表格:</p> <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/4722.image_0C0831F2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/4722.image_5F00_0C0831F2.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/2146.image_thumb_1EDCB59C.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/2146.image_5F00_thumb_5F00_1EDCB59C.png" width="823" height="516" /></a>  <p>关于AxBC class的说明参看<a title="http://technet.microsoft.com/en-us/library/aa873749.aspx" href="http://technet.microsoft.com/en-us/library/aa873749.aspx">http://technet.microsoft.com/en-us/library/aa873749.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Dynamics CRM Connector: 倒入AX Vendor记录到CRM自定义实体内</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/dynamics-crm-connector-ax-vendorcrm</link>
      <pubDate>Fri, 20 Sep 2013 02:55:34 GMT</pubDate>
      <dc:creator><![CDATA[Clifford Zhang[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2013/09/20/dynamics-crm-connector-ax-vendorcrm/</guid>
      <description><![CDATA[如下测试是基于Dynamics CRM Connector V3 Refresh版本，AX 2012 R2 CU6, 以及Dynamics CRM 2011 最新版本。  相关的版本历史记录请查看...]]></description>
      <content:encoded><![CDATA[<p>如下测试是基于Dynamics CRM Connector V3 Refresh版本，AX 2012 R2 CU6, 以及Dynamics CRM 2011 最新版本。</p>  <p>相关的版本历史记录请查看</p>  <p><a title="http://blogs.msdn.com/b/crminthefield/archive/2012/08/15/microsoft-dynamics-crm-4-0-and-2011-update-rollup-release-dates-build-numbers-and-collateral.aspx" href="http://blogs.msdn.com/b/crminthefield/archive/2012/08/15/microsoft-dynamics-crm-4-0-and-2011-update-rollup-release-dates-build-numbers-and-collateral.aspx">http://blogs.msdn.com/b/crminthefield/archive/2012/08/15/microsoft-dynamics-crm-4-0-and-2011-update-rollup-release-dates-build-numbers-and-collateral.aspx</a></p>  <p><a title="http://blogs.msdn.com/b/dynamicsconnector/archive/2012/06/19/connector-for-microsoft-dynamics-version-history.aspx" href="http://blogs.msdn.com/b/dynamicsconnector/archive/2012/06/19/connector-for-microsoft-dynamics-version-history.aspx">http://blogs.msdn.com/b/dynamicsconnector/archive/2012/06/19/connector-for-microsoft-dynamics-version-history.aspx</a></p>  <p><a title="http://www.axaptapedia.com/Build_numbers" href="http://www.axaptapedia.com/Build_numbers">http://www.axaptapedia.com/Build_numbers</a></p>  <p><strong><font size="3">问题的由来：</font></strong></p>  <p>Dynamics CRM Connector没有标准的针对AX Vendor (VendTable)的AIF服务; 已有的是针对AX Customer (CustTable)的AIF服务 – ConnCustomerOrgService. AX 2012中有标准的CustCustomerService 为什么CRM Connector不能直接使用呢？答案在于AX2012 里的新特性表级别的继承关系。具体到这里是由于DirPartyXXX系列的多态表类型，所以导致标准的AIF服务没办法利用。</p>  <p><a href="http://blogs.msdn.com/b/dynamicsconnector/archive/2012/08/14/integrating-microsoft-dynamics-ax-2012-inherited-tables-with-connector-for-microsoft-dynamics.aspx">http://blogs.msdn.com/b/dynamicsconnector/archive/2012/08/14/integrating-microsoft-dynamics-ax-2012-inherited-tables-with-connector-for-microsoft-dynamics.aspx</a></p>  <p>同理AX 2012有标准的AIF VendVendTableService，但是CRM&#160; Connector部鞥直接使用，所以我们必须仿照ConnCustomerOrgService创建新的针对Vendor的AIF 服务。</p>  <p><strong><font size="3">新建AIF服务步骤：</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/4336.clip_image002_1AE258AC.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/4336.clip_5F00_image002_5F00_1AE258AC.png"><img title="clip_image002" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/8802.clip_image002_thumb_20BCFC45.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/8802.clip_5F00_image002_5F00_thumb_5F00_20BCFC45.png" width="244" height="51" /></a></p>  <p>1. 倒入附件里的Project到AX中去,编译该Project并运行ConnectorHelper.main()方法</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7282.clip_image001_1F786366.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7282.clip_5F00_image001_5F00_1F786366.png"><img title="clip_image001" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/6840.clip_image001_thumb_03F36163.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/6840.clip_5F00_image001_5F00_thumb_5F00_03F36163.png" width="715" height="454" /></a></p>  <p>2. AOT -&gt;&gt; Tools -&gt;&gt; Application Integration Framework -&gt;&gt; Create Document Service</p>  <p>其中最后的Axd Document Class 要记下来，后面修改object config文件的QueryName时候要用到。</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7446.clip_image0024_2BD660C2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7446.clip_5F00_image0024_5F00_2BD660C2.png"><img title="clip_image002[4]" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image002[4]" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7024.clip_image0024_thumb_5F32241E.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7024.clip_5F00_image0024_5F00_thumb_5F00_5F32241E.png" width="641" height="519" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7455.clip_image003_0F0CC5E0.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7455.clip_5F00_image003_5F00_0F0CC5E0.png"><img title="clip_image003" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image003" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3122.clip_image003_thumb_2D7706C9.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3122.clip_5F00_image003_5F00_thumb_5F00_2D7706C9.png" width="687" height="553" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7142.clip_image004_6404B20D.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7142.clip_5F00_image004_5F00_6404B20D.png"><img title="clip_image004" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/0284.clip_image004_thumb_5579901B.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/0284.clip_5F00_image004_5F00_thumb_5F00_5579901B.png" width="667" height="524" /></a></p>  <p>3。发布该ConnVendorOrgService</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1538.clip_image005_124E11EE.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1538.clip_5F00_image005_5F00_124E11EE.png"><img title="clip_image005" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image005" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/2502.clip_image005_thumb_4228B3AF.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/2502.clip_5F00_image005_5F00_thumb_5F00_4228B3AF.png" width="805" height="531" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3058.clip_image007_1145FC44.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3058.clip_5F00_image007_5F00_1145FC44.jpg"><img title="clip_image007" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image007" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1781.clip_image007_thumb_3CAA1D3E.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1781.clip_5F00_image007_5F00_thumb_5F00_3CAA1D3E.jpg" width="795" height="347" /></a></p>  <p>4. 在CRM Connector中重新配置AX 2012 Adapter, 勾选步骤3中发布的AIF服务。然后configure生成config 文件。</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1323.clip_image008_0C3398C8.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1323.clip_5F00_image008_5F00_0C3398C8.png"><img title="clip_image008" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3364.clip_image008_thumb_4A4CB379.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3364.clip_5F00_image008_5F00_thumb_5F00_4A4CB379.png" width="762" height="437" /></a></p>  <p>5. 到CRM Connector安装路径，在AX 2012 Adapter下找到对应的刚刚发布的AIF服务的.config文件，打开修改: </p>  <p>在文件的尾部，修改QueryName为第2步里Axd Document Class对应的类，注意这个名字是大小写敏感的，不要写错了。</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/5775.clip_image009_4E768B3E.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/5775.clip_5F00_image009_5F00_4E768B3E.png"><img title="clip_image009" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image009" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/4572.clip_image009_thumb_5A2BD270.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/4572.clip_5F00_image009_5F00_thumb_5F00_5A2BD270.png" width="839" height="132" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/6177.clip_image010_23024477.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/6177.clip_5F00_image010_5F00_23024477.png"><img title="clip_image010" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image010" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3757.clip_image010_thumb_73177CE8.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3757.clip_5F00_image010_5F00_thumb_5F00_73177CE8.png" width="815" height="615" /></a></p>  <p>6. 新建map: CRM Custom Entity (TestEntity) -&gt;&gt; AX 2012 Conn Vendor Org Document Service</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/2234.clip_image011_6F49B24B.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/2234.clip_5F00_image011_5F00_6F49B24B.png"><img title="clip_image011" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image011" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/6242.clip_image011_thumb_6679A9FF.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/6242.clip_5F00_image011_5F00_thumb_5F00_6679A9FF.png" width="723" height="316" /></a></p>  <p>因时间限制我这里简单测试只映射了3个fields:</p>  <p>Currency=”USD”</p>  <p>VendGroup=”10”</p>  <p>OrganizationName=name</p>  <p>具体我建议你参考那个标准的Account to Customer Service map.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7840.clip_image012_4AF4A7FC.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7840.clip_5F00_image012_5F00_4AF4A7FC.png"><img title="clip_image012" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image012" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/4087.clip_image012_thumb_025AB92B.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/4087.clip_5F00_image012_5F00_thumb_5F00_025AB92B.png" width="713" height="172" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/2870.clip_image013_4073D3DC.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/2870.clip_5F00_image013_5F00_4073D3DC.png"><img title="clip_image013" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image013" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3312.clip_image013_thumb_5EDE14C5.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3312.clip_5F00_image013_5F00_thumb_5F00_5EDE14C5.png" width="714" height="167" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/8551.clip_image014_1CF72F77.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/8551.clip_5F00_image014_5F00_1CF72F77.png"><img title="clip_image014" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image014" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/0676.clip_image014_thumb_5B104A28.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/0676.clip_5F00_image014_5F00_thumb_5F00_5B104A28.png" width="697" height="235" /></a></p>  <p>7.该Map同步运行后</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7725.clip_image015_71EF1BA4.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7725.clip_5F00_image015_5F00_71EF1BA4.png"><img title="clip_image015" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image015" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/0830.clip_image015_thumb_7DA462D6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/0830.clip_5F00_image015_5F00_thumb_5F00_7DA462D6.png" width="777" height="374" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/7658.clip_image016_4D2DDE60.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/7658.clip_5F00_image016_5F00_4D2DDE60.png"><img title="clip_image016" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image016" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1667.clip_image016_thumb_20387B85.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1667.clip_5F00_image016_5F00_thumb_5F00_20387B85.png" width="776" height="480" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/2210.clip_image017_5D0CFD57.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/2210.clip_5F00_image017_5F00_5D0CFD57.png"><img title="clip_image017" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image017" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/2502.clip_image017_thumb_6D38C550.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/2502.clip_5F00_image017_5F00_thumb_5F00_6D38C550.png" width="756" height="632" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>在Domain Controller上安装all-in-one AX 2012 R2 Retail开发环境 -2</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/domain-controllerall-in-one-ax-2012-r2-retail-2</link>
      <pubDate>Thu, 29 Aug 2013 19:54:28 GMT</pubDate>
      <dc:creator><![CDATA[Clifford Zhang[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2013/08/29/domain-controllerall-in-one-ax-2012-r2-retail-2/</guid>
      <description><![CDATA[问题描述  碰到另外的一个问题是Sync Service (dbservers.exe)的运行帐户。开始时候没有仔细读安装说明, 按照通常习惯假定bcproxy帐户应该可以没问题，但是在Test...]]></description>
      <content:encoded><![CDATA[<p><font size="4"><strong>问题描述</strong></font></p>  <p>碰到另外的一个问题是Sync Service (dbservers.exe)的运行帐户。开始时候没有仔细读安装说明, 按照通常习惯假定bcproxy帐户应该可以没问题，但是在Test AOS Profile的时候还是碰到了错误:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1374.clip_image001_7FA27586.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1374.clip_5F00_image001_5F00_7FA27586.png"><img title="clip_image001" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/0576.clip_image001_thumb_3DBB9038.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/0576.clip_5F00_image001_5F00_thumb_5F00_3DBB9038.png" width="692" height="228" /></a></p>  <p>错误消息:</p>  <p>“unable to connect to an Application Object Server. A company name or server name may not be specified correctly in the client configuration or the server specified may not be available”</p>  <p>call stack如下:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/5430.image_7B6877F4.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/5430.image_5F00_7B6877F4.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/5282.image_thumb_12474971.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/5282.image_5F00_thumb_5F00_12474971.png" width="871" height="55" /></a></p>  <h5><font size="1">我当前登录到AX client的帐户是administrator,怎么可能没办法登录到AX系统呢？</font></h5>  <h5><font size="4"><font style="font-weight: bold">分析研究</font></font></h5>  <h5>当我们对AOS Profile进行test connection时候，根据AOS Profile对应的Commerce Data Exchange: Sync Service Profile找到对应的SyncService地址发送Socket请求到对应DBServer.exe，DBServer.exe会使用这里的AOS Connection string通过调用BC.NET的LogOn来连接对应的AOS 。根据上面的call stack, 没有使用LogonAs系列函数. 所以我们test connection是使用DBServer.exe的process identity来登录AOS的，跟当前AX32.exe的登录帐户无关! - 这解释了为什么即使是当前AX client登录帐户是Administrator仍然无法成功。</h5>  <p>进一步我们看到安装说明上对Sync Service 帐户的需求:</p>  <p><a title="http://technet.microsoft.com/en-us/library/dd362055.aspx" href="http://technet.microsoft.com/en-us/library/dd362055.aspx">http://technet.microsoft.com/en-us/library/dd362055.aspx</a>&#160;</p>  <p><strong>“Create Account for Retail Services</strong></p>  <p><strong>Description </strong></p>  <p>The accounts that the Synch Service Windows service runs as. These accounts are used to communicate with the database server. </p>  <p>Consider the following points when you select an account: </p>  <ul>   <li>     <p>Guest or temporary user accounts are not supported. </p>   </li>    <li>     <p><font style="background-color: #ffff00">The service user account on head-office instances of Synch Service must be a Microsoft Dynamics AX user.</font> </p>   </li>    <li>     <p>If you are installing a forwarder instance of Synch Service at headquarters, the service user account can be any valid domain account. </p>   </li>    <li>     <p>If you are installing an instance of Synch Service for a channel, you can use a valid local user account on the computer where the instance runs. </p>   </li>    <li>     <p>The account must be a member of the <strong>db_datareader</strong> and <strong>db_datawriter</strong> database roles in the message database. </p>   </li>    <li>     <p>This account must be created on POS computers where offline databases are located. </p>   </li> </ul>  <p>Enter this account when you run the Setup wizard to install Synch Service. For more information, see <a href="http://technet.microsoft.com/en-us/library/hh575262.aspx">Install Commerce Data Exchange: Synch </a></p>  <p>“</p>  <p><strong><font size="4">最后的解决方案:</font></strong></p>  <p>因为我们是在做All-In-One 安装，所以这个Sync Service帐号应该是个AX&#160; User用户，有权力直接登录AX读写AX的数据。而通常BC.NET帐号我们是不建议添加为AX User帐户的。</p>  <p>至此问题得以解决。</p>  <p>thanks</p>  <p>Cliff</p>]]></content:encoded>
    </item>
    <item>
      <title>在Domain Controller上安装all-in-one AX 2012 R2 Retail开发环境 -1</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/domain-controllerall-in-one-ax-2012-r2-retail-1</link>
      <pubDate>Thu, 29 Aug 2013 01:23:32 GMT</pubDate>
      <dc:creator><![CDATA[Clifford Zhang[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2013/08/29/domain-controllerall-in-one-ax-2012-r2-retail-1/</guid>
      <description><![CDATA[我们知道在生产环境下是不支持把所有东西都安装到一台机器(all-in-one)上去的,但是作为开发环境还是可行的。今天在具体安装过程中我个人碰到如下一个问题:  运行Retail Database...]]></description>
      <content:encoded><![CDATA[<p><font size="3">我们知道在生产环境下是不支持把所有东西都安装到一台机器(all-in-one)上去的,但是作为开发环境还是可行的。今天在具体安装过程中我个人碰到如下一个问题:</font></p>  <p><font size="3">运行Retail Database Utitility (RetailDatabaseUtility.exe)创建storedb的时候报错: a store with the specified storeid could not be found</font></p>  <p><font size="3">查看RetailDatabaseUtility.exe的日志文件 (通过在RetailDatabaseUtility.exe.Config配置文件修改SyncTracer=4 能够看到更加详细的信息)</font></p>  <p><font style="background-color: #ffff00">RetailDatabaseUtility.exe.Config 文件</font></p>  <p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;   <br />&lt;configuration&gt;    <br />&#160;&#160;&#160; &lt;configSections&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;sectionGroup name=&quot;userSettings&quot; type=&quot;System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; &gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;section name=&quot;Microsoft.Dynamics.Retail.Pos.DatabaseUtility.Properties.Settings&quot; type=&quot;System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; allowExeDefinition=&quot;MachineToLocalUser&quot; requirePermission=&quot;false&quot; /&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/sectionGroup&gt;    <br />&#160;&#160;&#160; &lt;/configSections&gt;    <br />&#160;&#160;&#160; &lt;connectionStrings /&gt;&#160; </p>  <p>&#160; &lt;system.diagnostics&gt;   <br />&#160;&#160;&#160; &lt;switches&gt;    <br />&#160;&#160;&#160;&#160;&#160; &lt;!--&#160; 0-off, 1-error, 2-warn, 3-info, 4-verbose. --&gt;    <br />&#160;&#160;&#160;&#160;&#160; <font style="background-color: #ffff00">&lt;add name=&quot;SyncTracer&quot; value=&quot;4&quot; /&gt;     <br /></font>&#160;&#160;&#160; &lt;/switches&gt;    <br />&#160;&#160;&#160; <br />&#160;&#160;&#160; &lt;trace autoflush=&quot;true&quot;&gt;    <br />&#160;&#160;&#160;&#160;&#160; &lt;listeners&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;add name=&quot;FileListener&quot; type=&quot;System.Diagnostics.TextWriterTraceListener&quot; initializeData=&quot;RetailDatabaseUtility.log&quot;/&gt;    <br />&#160;&#160;&#160;&#160;&#160; &lt;/listeners&gt;    <br />&#160;&#160;&#160; &lt;/trace&gt;    <br />&#160; &lt;/system.diagnostics&gt;</p>  <p><font size="3">接着在日志文件RetailDatabaseUtility.log中发现了如下具体错误</font></p>  <p>RetailDatabaseUtility.exe Error: 0 : EmbeddedInstall: CheckDatabase failed while configuring database access:System.Data.SqlClient.SqlException (0x80131904): <font style="background-color: #ffff00">Windows NT user or group 'CLIFFR2DC\POSUsers' not found. Check the name again.</font>    <br />&#160;&#160; at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)    <br />&#160;&#160; at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)    <br />&#160;&#160; at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)    <br />&#160;&#160; at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)    <br />&#160;&#160; at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)    <br />&#160;&#160; at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)    <br />&#160;&#160; at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()    <br />&#160;&#160; at Microsoft.Dynamics.Retail.Pos.CreateDatabaseService.Utilites.CreateSqlLoginForWindowsUser(DbCommand dbCommand, String userName)    <br />&#160;&#160; at Microsoft.Dynamics.Retail.Pos.CreateDatabaseService.EmbeddedInstall.ConfigureDatabaseAccessForUser(DbCommand dBCommand, String userName)    <br />&#160;&#160; at Microsoft.Dynamics.Retail.Pos.CreateDatabaseService.EmbeddedInstall.CheckDatabase(String connectionString, String databasePhysicalFilePath, Boolean includeDemoData, String userGroupName)</p>  <p>ClientConnectionId:20668fd5-309d-482b-a9ae-d526998be000   <br />RetailDatabaseUtility.exe Error: 0 : DBUtilityCore&lt;ProvisionDatabasesForSynchronizationAsync&gt;b__7: <font style="background-color: #ffff00">A store with the specified StoreId could not be found.</font></p>  <p><font size="3">所以我们要先解决掉错误 “<font style="background-color: #ffff00">Windows NT user or group 'CLIFFR2DC\POSUsers' not found. Check the name again“</font></font></p>  <p><font size="3"><font style="background-color: #ffffff"><font style="style"><font style="style">那么</font></font>这个用户组'CLIFFR2DC\POSUsers‘是从哪里来的呢？其实POSUsers是在<font style="background-color: #ffff00">RetailDatabaseUtility.exe.Config 文件</font></font><font style="background-color: #ffffff">中通过DataBaseAccessUserGroup指定的:</font></font></p>  <p>&lt;appSettings&gt;   <br />&#160; &lt;add key=&quot;Test&quot; value=&quot;value&quot; /&gt;    <br />&#160; &lt;add key=&quot;OfflineServerName&quot; value=&quot;cliffr2dc&quot; /&gt;    <br />&#160; &lt;add key=&quot;OfflineDatabaseName&quot; value=&quot;OfflinePOSDB&quot; /&gt;    <br />&#160; &lt;add key=&quot;StoreServerName&quot; value=&quot;CLIFFR2DC&quot; /&gt;    <br />&#160; &lt;add key=&quot;StoreDatabaseName&quot; value=&quot;StoreDB&quot; /&gt;    <br />&#160; &lt;add key=&quot;StoreID&quot; value=&quot;Store 1&quot; /&gt;    <br />&#160; &lt;add key=&quot;TerminalID&quot; value=&quot;0101&quot; /&gt;    <br />&#160; &lt;add key=&quot;DataAreaID&quot; value=&quot;ceu&quot; /&gt;    <br />&#160; <font style="background-color: #ffff00">&lt;add key=&quot;DatabaseAccessUserGroup&quot; value=&quot;POSUsers&quot; /&gt;     <br /></font>&#160; &lt;add key=&quot;CreateDBAccessUserGroup&quot; value=&quot;True&quot; /&gt;    <br />&#160; &lt;add key=&quot;PosExecutablePath&quot; value=&quot;..\Retail POS\POS.exe&quot; /&gt;    <br />&#160; &lt;add key=&quot;SyncServiceExecutablePath&quot; value=&quot;..\Retail POS\RetailOffline\Microsoft.Dynamics.Retail.Offline.Service.exe&quot; /&gt;    <br />&#160; &lt;add key=&quot;ConnectionStringTemplate&quot; value=&quot;Integrated Security=SSPI;Persist Security Info=false;Pooling=true;TrustServerCertificate=true;Encrypt=TRUE&quot; /&gt;    <br />&lt;/appSettings&gt;</p>  <p><font size="3">也就是说在创建新的StoreDB时候会同时创建对应的SQL Login并赋予合适的SQL权限。通过分析代码我们看到如果DataBaseAccessUserGroup不是使用domain\alias的方式指定的，那么系统会使用本级机器名字构建（ 因为店面系统可能不和总部HQ在同一Active Directory 范围内，所以这个UserGroup是本地的比建成整个AD Domain范围的试用面更广）。但Domain Controller上没有办法创建local user groups!</font></p>    <br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/3113.image_6659521A.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/3113.image_5F00_6659521A.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/5238.image_thumb_20681EFA.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/5238.image_5F00_thumb_5F00_20681EFA.png" width="417" height="279" /></a>  <p><font size="3">明白了上面的道理，,所以要想在DC上装POS系统那么解决办法就很简单了, 只要把DatabaseAccessUserGroup的值设为domain\alias的方式即可:</font></p>  <p>&lt;appSettings&gt;   <br />&#160; &lt;add key=&quot;Test&quot; value=&quot;value&quot; /&gt;    <br />&#160; &lt;add key=&quot;OfflineServerName&quot; value=&quot;cliffr2dc&quot; /&gt;    <br />&#160; &lt;add key=&quot;OfflineDatabaseName&quot; value=&quot;OfflinePOSDB&quot; /&gt;    <br />&#160; &lt;add key=&quot;StoreServerName&quot; value=&quot;CLIFFR2DC&quot; /&gt;    <br />&#160; &lt;add key=&quot;StoreDatabaseName&quot; value=&quot;StoreDB&quot; /&gt;    <br />&#160; &lt;add key=&quot;StoreID&quot; value=&quot;Store 1&quot; /&gt;    <br />&#160; &lt;add key=&quot;TerminalID&quot; value=&quot;0101&quot; /&gt;    <br />&#160; &lt;add key=&quot;DataAreaID&quot; value=&quot;ceu&quot; /&gt;    <br />&#160; <font style="background-color: #ffff00">&lt;add key=&quot;DatabaseAccessUserGroup&quot; value=&quot;<font color="#ff0000">CliffR2\POSUsers</font>&quot; /&gt;      <br /></font>&#160; &lt;add key=&quot;CreateDBAccessUserGroup&quot; value=&quot;True&quot; /&gt;    <br />&#160; &lt;add key=&quot;PosExecutablePath&quot; value=&quot;..\Retail POS\POS.exe&quot; /&gt;    <br />&#160; &lt;add key=&quot;SyncServiceExecutablePath&quot; value=&quot;..\Retail POS\RetailOffline\Microsoft.Dynamics.Retail.Offline.Service.exe&quot; /&gt;    <br />&#160; &lt;add key=&quot;ConnectionStringTemplate&quot; value=&quot;Integrated Security=SSPI;Persist Security Info=false;Pooling=true;TrustServerCertificate=true;Encrypt=TRUE&quot; /&gt;    <br />&lt;/appSettings&gt;</p>  <p>&#160;</p>  <p>Cliff</p>]]></content:encoded>
    </item>
    <item>
      <title>Chinese Voucher Type Priority Number</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/chinese-voucher-type-priority-number</link>
      <pubDate>Sun, 01 Apr 2012 09:00:29 GMT</pubDate>
      <dc:creator><![CDATA[Lucy Wu]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2012/04/01/chinese-voucher-type-priority-number/</guid>
      <description><![CDATA[The field Priority Number(General ledger &gt; Setup &gt; journals--&gt; voucher type setup--&gt;...]]></description>
      <content:encoded><![CDATA[<p>The field Priority Number(General ledger &gt; Setup &gt; journals--&gt; voucher type setup--&gt; voucher type &nbsp;) is to define the sequence how system check the rules in voucher type settings when post Chinese voucher. System will check the voucher type rules by descending sequence, higher number first and then lower number.</p>
<p>&nbsp;</p>
<p>As the legal requirement of Chinese voucher types ,system will check the rules of all Chinese voucher type according to priority number settings even if user specify the voucher type in journal. User needs to define the Chinese voucher type rules carefully with the priority settings, if the journal is align with several voucher type rules, it should be with the voucher type with highest priority number. Eg. Cashrec with highest priority number, if your journal is OK with cashrec but be specified as bankrec, then system will regard it as an error</p>
<p>&nbsp;</p>
<p>It is not a must but as a recommendation, we normally suggest the default voucher type to set as lowest priority number since the rules for it will be ignored. For system posted journal, system will automatically choose the voucher type. If the default voucher type is set as highest priority, system will always choose this voucher type instead of going through by the priority.</p>]]></content:encoded>
    </item>
    <item>
      <title>如何在AX2012系统中添加财务维度</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/ax2012</link>
      <pubDate>Sun, 01 Apr 2012 08:54:34 GMT</pubDate>
      <dc:creator><![CDATA[Lucy Wu]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2012/04/01/ax2012/</guid>
      <description><![CDATA[在AX 系统中，用户可以自己添加财务维度(Finance Dimension）来满足财务核算和财务分析的要求。财务维度的设计在AX 2012 与AX 2009...]]></description>
      <content:encoded><![CDATA[<p>在AX 系统中，用户可以自己添加财务维度(Finance Dimension）来满足财务核算和财务分析的要求。财务维度的设计在AX 2012 与AX 2009 及以前版本中的改动较大，相应的步骤和设置完全不同，用户需要执行哪些以下操作在AX2012系统中添加维度以保证其可以正确设置和使用：</p>
<p>a. General ledger &gt; Setup &gt; Chart of account &gt; Configure account structures &gt; select one that is being used in your company by some of your MainAccounts <br />i. If you are unsure which are being used, you can find it out by going to <br />ii. General ledger &gt; Setup &gt; Ledger &gt; Chart of accounts = Corporate Main account (Shared). Now you know the name of the Chart of accounts in this company. <br />iii. Right-click the field to select &lsquo;View details&rsquo; <br />iv. Here you can see the Account structures being used on your chart of account=&lsquo;Corporate Main account (Shared) <br />v. Select one of the Account structures and click on button &lsquo;Configure account structure&rsquo; <br />b. Edit button <br />c. Add segment (to the right) &gt; select your new dimension.<br />d. Activate button <br /><br />在以上步骤后，就可以在所有的journal，PO， SO 等所有finance dimension的界面中看到新增的财务维度。</p>]]></content:encoded>
    </item>
    <item>
      <title>AX零售：在POS DB管理数据清理任务</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/axpos-db</link>
      <pubDate>Mon, 05 Mar 2012 23:58:00 GMT</pubDate>
      <dc:creator><![CDATA[wilson jin1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2012/03/05/axpos-db/</guid>
      <description><![CDATA[问题描述:&nbsp;
POS的数据清理流程尚未完全实现，因此我们需要运行一个小的手工作业来确保您的数据库不会被无用记录填满。
&nbsp;
解决方案：...]]></description>
      <content:encoded><![CDATA[<p><b><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/1425.POS%20clean1.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52/1425.POS-clean1.png"></a>问题描述</b><b>:&nbsp;</b></p>
<p>POS的数据清理流程尚未完全实现，因此我们需要运行一个小的手工作业来确保您的数据库不会被无用记录填满。</p>
<p><b>&nbsp;</b></p>
<p><b>解决方案：</b><b> </b></p>
<p>我们创建了一个SQL定时脚本。在本文的例子中我们将时限设为150天。所有150天前的交易都会被删除。</p>
<p>脚本运行的频率由复制作业(P-JOB)的频率决定，通常低至1-5天。&nbsp;</p>
<p>1．&nbsp; 打开SQL 管理工作室</p>
<p>2．&nbsp; 打开维护计划</p>
<p>3．&nbsp; 创建新计划并取名为DeletePOSData</p>
<p><b><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/1425.POS%20clean1.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52/1425.POS-clean1.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/1425.POS%20clean1.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52/1425.POS-clean1.png" /></a></b></p>
<p>&nbsp;</p>
<p>4. 切换到执行T-SQL 语句任务</p>
<p>5. 编辑任务并添加删除语句</p>
<table style="width: 495px;" border="0" cellspacing="3" cellpadding="0">
<tbody>
<tr>
<td>
<p>USE AXRETAILPOS<br />GO<br />-- All POS transactions tables<br />-- All records that are more than 150 days will be deleted</p>
<p>DELETE FROM dbo.RBOTRANSACTIONBANKEDTENDE20338<br />WHERE transdate &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONINCOMEEXPEN20158<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONINFOCODETRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONINFOCODETRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONINVENTTRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONLOYALTYPOIN20296<br />WHERE createdDate &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONLOYALTYPOINTTRANS<br />WHERE createdDate &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONLOYALTYTRANS<br />WHERE REPLICATED = 1;</p>
<p>DELETE FROM dbo.RBOTRANSACTIONMIXANDMATCHTRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONORDERINVOICETRANS<br />WHERE REPLICATED = 1;</p>
<p>DELETE FROM dbo.RBOTRANSACTIONPAYMENTTRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONSAFETENDERTRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONSALESTRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONSALESTRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONTABLE<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONTENDERDECLA20165<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>DELETE FROM dbo.RBOTRANSACTIONVARIANTTRANS<br />WHERE TRANSDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
<p>-- POS log table<br />-- ALL data that is more than 150 days will be deleted</p>
<p>DELETE FROM dbo.POSISLOG<br />WHERE LOGDATE &lt; DATEADD(day, -150, CAST(GETDATE() AS date));</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>6. 将作业时间表设为每天运行一次</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/8311.POS%20clean2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52/8311.POS-clean2.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/8311.POS%20clean2.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52/8311.POS-clean2.png" /></a></p>
<p></p>
<p>7. 保存维护作业</p>
<p>8. 确保您的SQL代理正常运行，它会每天执行作业</p>
<p>&nbsp;</p>
<p>原文地址：</p>
<p><a href="http://blogs.msdn.com/b/axsupport/archive/2012/02/12/ax-for-retail-manage-data-cleanup-task-in-pos-database.aspx">http://blogs.msdn.com/b/axsupport/archive/2012/02/12/ax-for-retail-manage-data-cleanup-task-in-pos-database.aspx</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>AX 2012 中Security Tools的用法简介</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/ax-2012-security-tools</link>
      <pubDate>Mon, 20 Feb 2012 00:05:32 GMT</pubDate>
      <dc:creator><![CDATA[Ace Shan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2012/02/20/ax-2012-security-tools/</guid>
      <description><![CDATA[&nbsp; 在这篇博客中，我想花点时间，和大家介绍一下AOT中的Security Tools的用法

在谈到AX...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;<span style="font-size: medium;"> <span style="font-family: 宋体;" lang="zh-CN">在这篇博客中，</span><span style="font-family: Calibri;" lang="zh-CN">我想花</span><span style="font-family: 宋体;" lang="zh-CN">点</span><span style="font-family: Calibri;" lang="zh-CN">时间，</span><span style="font-family: 宋体;" lang="zh-CN">和大家介绍一下</span><span style="font-family: Calibri;" lang="en-US">AOT</span><span style="font-family: 宋体;" lang="zh-CN">中的</span><span style="font-family: Calibri;" lang="en-US">Security Tools</span><span style="font-family: 宋体;" lang="zh-CN">的用法</span></span></p>
<p><span style="font-family: 宋体;" lang="zh-CN"><img src="http://www.fluidunion.com/ax2012/sectools/st001.png" /></span></p>
<p style="margin: 0in; color: #333333; font-size: 12pt;"><span style="font-family: Calibri;" lang="zh-CN">在</span><span style="font-family: 宋体;" lang="zh-CN">谈到</span><span style="font-family: arial;" lang="zh-CN">AX</span><span style="font-family: arial;" lang="en-US"> 2012</span><span style="font-family: Calibri;" lang="zh-CN">中的安全</span><span style="font-family: 宋体;" lang="zh-CN">设置</span><span style="font-family: Calibri;" lang="zh-CN">时，重要的是要了解</span><span style="font-family: 宋体;" lang="zh-CN">内置的</span><span style="font-family: Calibri;" lang="zh-CN">安全对象</span><span style="font-family: 宋体;" lang="zh-CN">：</span><span style="font-family: arial;" lang="en-US">Duty</span><span style="font-family: 宋体;" lang="zh-CN">，</span><span style="font-family: arial;" lang="en-US">Role...</span><span style="font-family: Calibri;" lang="zh-CN">。</span></p>
<p><img src="http://www.fluidunion.com/ax2012/xds/xds001.png" /></p>
<p>&nbsp;<span style="font-size: medium;"><span style="font-family: Calibri;" lang="zh-CN">通过</span><span style="font-family: Calibri;" lang="en-US">Duty</span><span style="font-family: Calibri;" lang="zh-CN">和</span><span style="font-family: Calibri;" lang="en-US">Role</span><span style="font-family: Calibri;" lang="zh-CN">，</span><span style="font-family: 宋体;" lang="zh-CN">我们可以赋予每个对象特定的访问权限</span><span style="font-family: Calibri;" lang="zh-CN">，</span><span style="font-family: 宋体;" lang="zh-CN">这里以</span><span style="font-family: Calibri;" lang="en-US">salestable</span><span style="font-family: 宋体;" lang="zh-CN">作为例子。具体操作如下：展开</span><span style="font-family: Calibri;" lang="en-US">AOT-&gt;Data Dictionary-&gt;Table</span><span style="font-family: 宋体;" lang="zh-CN">，右键点击</span><span style="font-family: Calibri;" lang="en-US">SalesTable</span><span style="font-family: Calibri;" lang="zh-CN">，</span><span style="font-family: 宋体;" lang="zh-CN">点击</span><span style="font-family: Calibri;" lang="en-US">Add-Ins-&gt;Security tools-&gt;View related security roles</span><span style="font-family: 宋体;" lang="zh-CN">，然后就可以看到</span><span style="font-family: Calibri;" lang="zh-CN">下屏</span><span style="font-family: 宋体;" lang="zh-CN">所示内容：</span></span></p>
<p><img src="http://www.fluidunion.com/ax2012/sectools/st002.png" /></p>
<p style="margin: 0in;">&nbsp;</p>
<p style="margin: 0in; color: #333333; font-size: 12pt;"><span style="font-family: 宋体;" lang="zh-CN">这个表单里面的内容可以通过</span><span style="font-family: Calibri;" lang="en-US">filter</span><span style="font-family: 宋体;" lang="zh-CN">来进行筛选，以便获取你需要的安全信息。</span></p>
<p><img src="http://www.fluidunion.com/ax2012/sectools/st003.png" /></p>
<p style="margin: 0in; color: #333333; font-size: 12pt;"><span style="font-family: 宋体;" lang="zh-CN">更好的是，你可以通过导出功能将表单里面的内容导出到</span><span style="font-family: Calibri;" lang="en-US">excel</span><span style="font-family: 宋体;" lang="zh-CN">中。</span></p>
<p><img src="http://www.fluidunion.com/ax2012/sectools/st004.png" /></p>
<p style="margin: 0in; color: #333333; font-size: 12pt;"><span style="font-family: Calibri;" lang="zh-CN">单击导出到</span><span style="font-family: arial;" lang="zh-CN">Excel</span><span style="font-family: Calibri;" lang="zh-CN">，</span><span style="font-family: 宋体;" lang="zh-CN">我们可以直接在</span><span style="font-family: arial;" lang="en-US">excel</span><span style="font-family: 宋体;" lang="zh-CN">上做与安全设置有关的操作</span><span style="font-family: Calibri;" lang="zh-CN">。</span></p>
<p><img src="http://www.fluidunion.com/ax2012/sectools/st005.png" /></p>
<p style="margin: 0in; color: #333333; font-size: 12pt;"><span style="font-family: Calibri;" lang="zh-CN">那么，</span><span style="font-family: 宋体;" lang="zh-CN">这有助于了解</span><span style="font-family: arial;" lang="zh-CN">AX</span><span style="font-family: Calibri;" lang="zh-CN">的运作</span><span style="font-family: 宋体;" lang="zh-CN">方式</span><span style="font-family: Calibri;" lang="zh-CN">，</span><span style="font-family: 宋体;" lang="zh-CN">您还可以通过</span><span style="font-family: arial;" lang="en-US">AOT-&gt;Menus-&gt;SysContextMenu</span><span style="font-family: 宋体;" lang="zh-CN">来了解</span><span style="font-family: arial;" lang="en-US">security tools</span><span style="font-family: 宋体;" lang="zh-CN">的有关结构。</span></p>
<p><img src="http://www.fluidunion.com/ax2012/sectools/st006.png" /></p>
<p style="margin: 0in; color: #333333; font-size: 12pt;"><span style="font-family: Calibri;" lang="zh-CN">有了这</span><span style="font-family: 宋体;" lang="zh-CN">些</span><span style="font-family: Calibri;" lang="zh-CN">信息，</span><span style="font-family: 宋体;" lang="zh-CN">对</span><span style="font-family: Calibri;" lang="en-US">AX</span><span style="font-family: 宋体;" lang="zh-CN">的安全性设置</span><span style="font-family: Calibri;" lang="zh-CN">变得轻松了许多。如果你有兴趣了解更多</span><span style="font-family: 宋体;" lang="zh-CN">关于如何在右键菜单中加入自己的内容</span><span style="font-family: Calibri;" lang="zh-CN">，</span><span style="font-family: Calibri;" lang="en-US">MSDN</span><span style="font-family: 宋体;" lang="zh-CN">上有篇文章很具有参考价值</span><span style="font-family: Calibri;" lang="zh-CN">：</span></p>
<p style="margin: 0in;"><a href="http://msdn.microsoft.com/en-us/library/aa884843.aspx"><span style="font-family: arial; background: white; font-size: 9.75pt;">How to: Add Items to the AOT Add-Ins Menu [AX 2012]</span></a><span style="font-family: Calibri; font-size: 11pt;"> </span></p>]]></content:encoded>
    </item>
    <item>
      <title>Not Responding 程序挂起？</title>
      <link>https://docs.microsoft.com/archive/blogs/axchina/not-responding</link>
      <pubDate>Tue, 20 Sep 2011 02:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Clifford Zhang[MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/axchina/2011/09/20/not-responding/</guid>
      <description><![CDATA[背景：  对于有界面的应用程序来说, Windows增加了程序挂起的检查(Not Responding). 默认下原理是这样的:...]]></description>
      <content:encoded><![CDATA[<p><strong>背景：</strong></p>  <p>对于有界面的应用程序来说, Windows增加了程序挂起的检查(Not Responding). 默认下原理是这样的:</p>  <p>负责UI的线程在5秒内如果不能把发送给它的mouse/keyboard输入消息取走，那么Windows 的Desktop Manager 会创建一个ghost window在另外的进程(dwm.exe)上去。 Windows的任务管理器调用<a title="IsHungAppWindow" href="http://msdn.microsoft.com/en-us/library/ms633526.aspx">IsHungAppWindow</a>来判断某个程序是否hung了。</p>  <p>详细参看<a title="http://blogs.msdn.com/b/meason/archive/2010/01/04/windows-error-reporting-for-hangs.aspx" href="http://blogs.msdn.com/b/meason/archive/2010/01/04/windows-error-reporting-for-hangs.aspx">http://blogs.msdn.com/b/meason/archive/2010/01/04/windows-error-reporting-for-hangs.aspx</a>&#160;</p>  <p><a title="http://blogs.msdn.com/b/wer/archive/2009/03/19/let-there-be-hangs-part-1-not-responding.aspx" href="http://blogs.msdn.com/b/wer/archive/2009/03/19/let-there-be-hangs-part-1-not-responding.aspx">http://blogs.msdn.com/b/wer/archive/2009/03/19/let-there-be-hangs-part-1-not-responding.aspx</a></p>  <p><strong>问题:</strong></p>  <p>这个默认的5秒非常短暂，对于手动抓取memory dump来说非常难以操作，而且如果你还不确认什么情况下会发生程序挂起就更加难上加难. 有什么办法能自动抓取memory dump么？</p>  <p><strong>解决办法:</strong></p>  <p>使用<a href="http://technet.microsoft.com/en-us/sysinternals/dd996900" target="_blank">ProcDump</a>的h选项:</p>  <p>ProcDump&#160; –ma <em>–64 –</em>h testhung.exe testhung.dmp</p>  <p>这个-h选项借助Windows <a href="http://msdn.microsoft.com/en-us/library/ms633526(VS.85).aspx">IsHungAppWindow</a> API来判断什么时候触发抓取memory dump,也即默认下使用5秒这个参数。ProcDump只会为第一次超过5秒的情况抓取memory dump, 然后等待直到程序退出，ProcDump不会把所有超过5秒的情况都分别抓取dump.</p>  <p>对于有些程序比如AX客户端，有些费时操作肯定会超过5秒，如果使用5秒作为开关那么抓取的那份memory dump可能还不是最重要的，如何抓取相对耗时比较长的时刻的memory dump呢？</p>  <p><strong>Option A: 手动方式</strong></p>  <p>如果发生程序挂起时候你有足够的操作时间，那么可以把 Task Manager运行起来找到挂起的程序进程，然后点击菜单Create Dump File生成一份memory dump.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/8400.image_32CDAFAD.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/8400.image_5F00_32CDAFAD.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/52/metablogapi/1663.image_thumb_7E4CDD64.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-52-metablogapi/1663.image_5F00_thumb_5F00_7E4CDD64.png" width="619" height="455" /></a></p>  <p><strong>Option B: 自动方式</strong></p>  <p>(1) 参照下面blog设置HungAppTimeout注册表值到一个合适的值 (比如你的程序挂起在30-50秒之间，那么设置HungAppTimeout=30000比较合适)。然后重新启动机器这个参数才能生效。</p>  <p><a href="http://blogs.msdn.com/b/meason/archive/2010/02/04/hungapptimeout.aspx">http://blogs.msdn.com/b/meason/archive/2010/02/04/hungapptimeout.aspx</a></p>  <p><b>Registry key:</b> HKCU\Control Panel\Desktop    <br /><b>Data type:</b> REG_SZ    <br /><b>Value name:</b> HungAppTimeout    <br /><b>Data</b>: Milliseconds (in decimal)</p>  <p>(2) 启动你的程序</p>  <p>(3) 运行ProcDump –h 选项在后台自动监测。</p>  <p>&#160;</p>  <p>thanks</p>  <p>Clifford</p>]]></content:encoded>
    </item>
  </channel>
</rss>