tag:blogger.com,1999:blog-42412380808638080712012-10-05T15:42:27.035+02:00DYNAMICS-AX-BLOGGER-BLOGABOUT DEVELOPING IN DYNAMICS AXTWInoreply@blogger.comBlogger56125tag:blogger.com,1999:blog-4241238080863808071.post-72742455598005030912012-08-31T18:30:00.000+02:002012-08-31T18:30:03.287+02:002012-08-31T18:30:03.287+02:00Best Practise Error: different origin value on a new objectI just got thie Best Pracitse Error on a newly created table in Dynamics AX 2012:<br />
<br />
<i>The element has an origin value that is different from the origin value in a previous version of Microsoft </i><i>Dynamics AX. </i><br />
<i><br /></i>
<i>Checks that the element had the same origin value in earlier versions of Microsoft Dynamics AX. The origin value is the beginning value of the element. This check was added due to the changes regarding installation specific IDs. </i><br />
<i>BPErrorObjectOriginMismatch
@SYS335100</i><br />
<i><br /></i>
I was confused about this message, cause it doesn't make any sence for new objects. After a <b>restart </b>of the AOS the error is gone.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-7274245559800503091?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-80212766893296066942012-08-30T17:30:00.000+02:002012-08-30T17:30:02.966+02:002012-08-30T17:30:02.966+02:00Set up AX 2012 to support workflowsSet up workflows in Dynamics AX 2012
<br />
<br />
Important steps to check:
<br />
<ul>
<li>System Administration </li>
<ul>
<li>Setup </li>
<ul>
<li>System</li>
<ul>
<li>Server configuration:<br />check that there is only the AOS instance that is required<br />acitvate the "is batch server" flag</li>
<li>System Service Accounts<br />check the Workflow execution account</li>
</ul>
<li>Workflow</li>
<ul>
<li>Workflow infrastructure configuration<br />Click through the wizard to set up the requiered batch jobs</li>
</ul>
</ul>
</ul>
<li>Also don't forget that workflows require CIL. So full CIL generation should be done.</li>
</ul>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-8021276689329606694?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-40638726164342506312012-08-30T11:26:00.001+02:002012-08-30T11:30:06.372+02:002012-08-30T11:30:06.372+02:00Book: Inside Microsoft Dynamics AX 2012The Book "<a href="http://amzn.to/OA4fOp">Inside Microsoft Dynamics AX 2012</a>" is ready for pre order at amazon.
<br /><br />
<a href="http://www.amazon.de/gp/product/0735667101/ref=as_li_tf_il?ie=UTF8&camp=1638&creative=6742&creativeASIN=0735667101&linkCode=as2&tag=thomaswnet-21"><img border="0" src="http://ws.assoc-amazon.de/widgets/q?_encoding=UTF8&ASIN=0735667101&Format=_SL110_&ID=AsinImage&MarketPlace=DE&ServiceVersion=20070822&WS=1&tag=thomaswnet-21" /></a><img alt="" border="0" height="1" src="http://www.assoc-amazon.de/e/ir?t=thomaswnet-21&l=as2&o=3&a=0735667101" style="border: none !important; margin: 0px !important;" width="1" />
<script src="http://wms.assoc-amazon.de/20070822/DE/js/link-enhancer-common.js?tag=thomaswnet-21" type="text/javascript">
</script>
<noscript>
<img src="http://wms.assoc-amazon.de/20070822/DE/img/noscript.gif?tag=thomaswnet-21" alt="" />
</noscript><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-4063872616434250631?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-71284758985773670172012-08-29T15:25:00.000+02:002012-08-29T15:41:28.901+02:002012-08-29T15:41:28.901+02:00CIL Generation problemsLately i had some trouble generating CIL. I got some Errors in standard Classes like Retail and SysQuery.
<br />
<i><br />CIL-Generierung: Error 1. Class: SysQuery, Method: queryAddStaticCursorAsRangeAndValue, Exception: System.ArgumentException: Type QueryBuildStaticlink was not found in the CIL that was generated from X++.
<br />\Classes\SysQuery\queryAddStaticCursorAsRangeAndValue</i>
<br />
<i>\Classes\RetailStatementPostSalesOrders\createAggregatedSaleLines Err: 351</i>
<i>\Classes\RetailStatementPostSalesOrders\createSalesOrders Err: 351</i>
<br /><br />
To get rid of the sysQuery error the following steps did the trick:<br /><ol>
<li>Compile SysQuery Class </li>
<li>Start Full CIL Generation </li>
</ol>
When these steps doesn't solve the problem another option is to deleter CIL Files and restart Full CiL:<br /><br />
<ol>
<li>Stop the AOS</li>
<li>Delete files in this folder
C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL\source</li>
<li>Start the AOS again</li>
<li>Start full CIL generation</li>
</ol>
<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-7128475898577367017?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-70492235816101897922012-08-21T18:57:00.000+02:002012-08-27T16:39:18.356+02:002012-08-27T16:39:18.356+02:00Difference between two dates in daysTo get the difference between two dates in dynamics ax just convert the dates into numbers and subtract one from the other. The result would be the amount of days between these dates.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">days = date2num(Date123) - date2num(Date234);</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: inherit;">To get the difference between two DateTime Values just use the DateTimeUtil Class. The result is the difference in seconds. So just divide these through #secondsPerDay and you'll get the days</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">
#timeConstants <br /><br />
days = DateTimeutil::getDifference(DateTime123, DateTime234) / #secondsPerDay;</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-7049223581610189792?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-78654591347746401392012-07-26T21:30:00.000+02:002012-08-21T17:57:59.456+02:002012-08-21T17:57:59.456+02:00AX 2012 view and edit modeTo find out if a AX 2012 form is in view or edit mode just call:<br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">element.inViewMode();</span><br />
<br />
To catch
override the task() method of the form and check if _taskId == #taskEditRecord.<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">public int task(int _taskId) </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">{ </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> #task </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> int ret; </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> ret = super(_taskId); </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> if (_taskId == #taskEditRecord) </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> { </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> info("edit or view mode?"); </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> } </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> return ret; </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">}</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-7865459134774640139?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-33993466575086031642012-07-25T09:50:00.000+02:002012-07-25T09:51:01.183+02:002012-07-25T09:51:01.183+02:00Calling a MenuItemThis post is just for me to remeber these lines of code ;)<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">MenuFunction menuFunction = new MenuFunction(menuitemdisplaystr(MENUITEM), MenuItemType::Display); </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">Args args = new Args();
</span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">args.caller(element); </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">args.record(DS); </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">menuFunction.run(args);</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-3399346657508603164?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-90313603143768795452012-07-24T11:47:00.003+02:002012-07-24T11:47:34.394+02:002012-07-24T11:47:34.394+02:00Dynamics AX BaseEnums in SSRS ReportsIn SSRS AX BaseEnums are represented by two fields in the DataSet<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-wu-HsyVejss/UA5uJnzQfLI/AAAAAAAAAOU/oJ2Jiuj4t9k/s1600/AXSSRSReportBaseEnumLabel.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://1.bp.blogspot.com/-wu-HsyVejss/UA5uJnzQfLI/AAAAAAAAAOU/oJ2Jiuj4t9k/s640/AXSSRSReportBaseEnumLabel.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Normally there is one with the "name" of the BaseEnum that represents the name of the element and another one called "name1" that contains the label of the element. In some cases this is switched around. So that "name" contains the label and "name1" contains the name of the element.</div>
<div class="separator" style="clear: both; text-align: left;">
The only way to notice that is to have a look at the Alias. There you can see LABEL or NAME.</div>
<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-9031360314376879545?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-4762747642311144782012-07-23T17:03:00.002+02:002012-07-23T17:04:13.392+02:002012-07-23T17:04:13.392+02:00How to sign a Dynamics AX model fileTo sign a model file you need an SNK file. If you don't have one just generate a key pair with the following command:<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bin\sn.exe -k YOURKEYFILE.snk<br />/(in older Versions it also could be in v6.0A) </span><br />
<br />
After that the snk file can be used to sign the model that is exported from an AOS. Make sure to set the client config to the right AOS and than just use the following command:<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">AxUtil export /model:NAMEOFTHEMODEL /file:MODEL.axmodel /key:
YOURKEYFILE.snk</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-476274764231114478?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-25068354650197218972012-06-19T15:30:00.000+02:002012-06-19T15:37:30.834+02:002012-06-19T15:37:30.834+02:00VisualStudio Message - .NetFramework.Version=v4.0 Profile Full<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-jiWn5nuEP8o/T-B-Qk0Ly4I/AAAAAAAAAOE/sP77rlSufqM/s1600/visualStudioCodeUpgrade_2012-06-19_15-26-13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="195" src="http://4.bp.blogspot.com/-jiWn5nuEP8o/T-B-Qk0Ly4I/AAAAAAAAAOE/sP77rlSufqM/s320/visualStudioCodeUpgrade_2012-06-19_15-26-13.png" width="320" /></a></div>
<br />
<div>
When this message apperas during upgrade of a VisualStudio 2008 project to VisualStudio 2010. Just open the .csproj file in an editor and remove the line:</div>
<div>
<targetframeworksubset>Full</targetframeworksubset></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-2506835465019721897?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-2240968138110265642012-06-11T17:00:00.000+02:002012-09-10T08:48:29.487+02:002012-09-10T08:48:29.487+02:00AXUtil and Powershell just to remeber the right syntax:<br />
<br />
Import Model:<br />
<span style="font-family: 'Courier New', Courier, monospace;">axutil import /file:abc.axmodel /conflict:push /config:AOSname</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
Delete Layer:
<br />
<span style="font-family: 'Courier New', Courier, monospace;">axutil delete /layer:usr /config:AOSname</span><br />
<span style="font-family: inherit;">instead of /config: it is possible to use the dbName /db:DBname </span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">PowerShell</span><br />
<span style="font-family: Courier New, Courier, monospace;">Uninstall-AXModel <string>-Database "NameOfDB"<string> <string><string>-Model "NameOfModel"</string></string></string></string></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-224096813811026564?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-88856051675555181932012-06-05T10:02:00.000+02:002012-07-24T13:24:47.027+02:002012-07-24T13:24:47.027+02:00SSRS Report: Display Image from Database<div class="separator" style="clear: both; text-align: left;">
To display an image from DynamicsAX in an SSRS report the easiest way is to add an EDT that Extends the Bitmap EDT to the tmp table for the report. In the Dataprovider just add the image to the tmp table (for further information about image handling in ax check the <a href="http://msdn.microsoft.com/en-us/library/image.aspx" target="_blank">image class</a>).</div>
<div class="separator" style="clear: both; text-align: left;">
Than add an image object onto the report design and set the properties. Select the right MIME-Type and try it!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-zCyn3HxhzhM/T829AOYmq_I/AAAAAAAAAN4/RUV_gGM_tdA/s1600/Bildeigenschaften_2012-06-04_10-01-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="364" src="http://2.bp.blogspot.com/-zCyn3HxhzhM/T829AOYmq_I/AAAAAAAAAN4/RUV_gGM_tdA/s400/Bildeigenschaften_2012-06-04_10-01-26.png" width="400" /></a></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-8885605167555518193?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-26545514034415639462012-05-21T16:17:00.000+02:002012-05-21T16:17:05.619+02:002012-05-21T16:17:05.619+02:00WTF<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-0Xa-0ZyRExg/T7pOVPCQMmI/AAAAAAAAANc/-M8Nq0y_2T4/s1600/ClassesSysInfoAction_EditornewStack.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-0Xa-0ZyRExg/T7pOVPCQMmI/AAAAAAAAANc/-M8Nq0y_2T4/s1600/ClassesSysInfoAction_EditornewStack.png" /></a></div>
<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-2654551403441563946?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-24233764535129647722012-04-19T17:30:00.000+02:002012-04-24T14:54:40.891+02:002012-04-24T14:54:40.891+02:00Add a single postal location to an ax 2012 form<br />
<div>
To add a single postal address to a form with the new ActionPane there are several steps to do:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://4.bp.blogspot.com/-lGNw552Zw4Q/T40s6fdpoEI/AAAAAAAAAMM/CSOX197KleI/s1600/Address.png" /></div>
<ol>
<li>Add the EDT <span style="font-family: 'Courier New', Courier, monospace;">LogisticsLocationRecId </span>to the table where the new postalAddress should be added</li>
<li>Add this table to the <span style="font-family: 'Courier New', Courier, monospace;">LogisticsLocationMap </span>and create a Mapping: <span style="font-family: 'Courier New', Courier, monospace;">LogisticsLocationMap.Location == theNewTable.LogsticsLocationRecId</span></li>
<li>Add the LogisticsPostalAddress Table to the Form<br /><br /><a href="http://1.bp.blogspot.com/-0FW0-p07QtA/T40wJMyWc8I/AAAAAAAAAMU/90n3CLhEyLY/s1600/AddressLogistics.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://1.bp.blogspot.com/-0FW0-p07QtA/T40wJMyWc8I/AAAAAAAAAMU/90n3CLhEyLY/s1600/AddressLogistics.png" /></a></li>
<li>Paste the following code to the form:<br /><br /><span style="font-family: 'Courier New', Courier, monospace;">public class FormRun extends ObjectRun<br />{<br /> LogisticsPostalAddressFormHandler addressController;<br />}</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br />public void init()</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">{</span><br />
<ol></ol>
<span style="font-family: 'Courier New', Courier, monospace;"> super();</span><br />
<ol></ol>
<span style="font-family: 'Courier New', Courier, monospace;"> addressController =<br />LogisticsPostalAddressFormHandler::newParameters(newTable_ds, logisticsPostalAddress_ds);</span><br />
<ol></ol>
<span style="font-family: 'Courier New', Courier, monospace;"> addressController.callerUpdateQuery(fieldNum(newTable, LogisticsLocationRecId));</span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">}</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">public LogisticsPostalAddressFormHandler getAddressController()</span><span style="font-family: 'Courier New', Courier, monospace;"></span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">{</span><span style="font-family: 'Courier New', Courier, monospace;"> <br /> return addressController;</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">}</span></div>
<span style="font-family: 'Courier New', Courier, monospace;">
</span></div>
</li>
<li>Place an ActionPane to your form with the MenuItemButtons New/Edit/Clear/Map.<br />The easiest way to do this is to copy and paste it from the BankAccountTable form.<br /><br />
</li>
<li>Add this Code to the active method of the main DS:<br /><br /><span style="font-family: 'Courier New', Courier, monospace;">public int active()<br />{<br /> int ret;<br /><br /> ret = super();<br /><br /> <b>if (ret)<br /> {<br /> addressController.callerActive();<br /> addressController.callerUpdateButtons(newAddress, editAddress, clearAddress, mapButton);<br /> }</b><br /> return ret;<br />}</span></li>
<li>after that synchronize table and map and than try to open the form ;)</li>
</ol>
<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">
</span></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-2423376453512964772?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-34185748325048306422012-04-11T15:36:00.001+02:002012-04-11T15:37:03.055+02:002012-04-11T15:37:03.055+02:00Problems with ordering grid columnsIf there are problems with the ordering of grid columns of a grid inside a tab although the AllowUserSetup of the form is set to Yes. Check if the method <span style="font-family: 'Courier New', Courier, monospace;">tabChanged </span>of the tab control is overwritten. Overwriting this method can cause problems with the re-ordering.<br />
Instead of using the <span style="font-family: 'Courier New', Courier, monospace;">TabChanged </span>on the tab control move the code to the <span style="font-family: 'Courier New', Courier, monospace;">pageActivated </span>method of the TabPage.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-3418574832504830642?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-57106043724053986172012-03-23T10:01:00.000+01:002012-03-23T10:01:09.850+01:002012-03-23T10:01:09.850+01:00Grouping data in SSRSTo group data on a report you need the <i>grouping pane</i>. If it is not visible click <i>grouping </i>on the <i>view </i>tab.<br />
In the grouping pane right click a group an select add before or after to specify where to add the group. This group dialog opens:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-aTjXEnxG_2Y/T2w6zQn0f6I/AAAAAAAAAJ8/HwjaiYg4t0c/s1600/SSRS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="309" src="http://4.bp.blogspot.com/-aTjXEnxG_2Y/T2w6zQn0f6I/AAAAAAAAAJ8/HwjaiYg4t0c/s320/SSRS.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Set the name of the group in this dialog. After that the group expression can be specified. Just add grouping criterias. It is possible to group by data fields or by expressions.</div>
<div class="separator" style="clear: both; text-align: left;">
When closing the dialog a new grouping pane is added to the tablix data region. it contains a row or column where group values can be displayed.</div>
<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-5710604372405398617?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-6464583343252836682012-03-22T14:26:00.000+01:002012-03-23T10:05:37.343+01:002012-03-23T10:05:37.343+01:00Fast way to refresh args caller datasourceCause I always forget these two lines of code to research the datasource of the calling args record in Dynamics AX. I will post it here so that I can google it every time I need it ;)<br />
<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">FormDataSource callerDataSource;</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">;</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">if (_args != null</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> && _args.record() != null)</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">{</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> callerDataSource = _args.record().dataSource();</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"> callerDataSource.research(true);</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">}</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-646458334325283668?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-85897752519302598062012-03-21T08:57:00.001+01:002012-03-21T08:57:14.478+01:002012-03-21T08:57:14.478+01:00Adding an AX table as Dataset to an SSRS ReportIt is important to add the following code in the processReport Method of the DataProvider class in Dynamics AX to use a Table as a new Dataset in an SSRS Report:<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">newTableNameTmp.setConnection(this.parmUserConnection());</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-8589775251930259806?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-66355161642301384832012-03-12T13:46:00.000+01:002012-03-21T08:53:06.610+01:002012-03-21T08:53:06.610+01:00HTML Tags that can be used in SSRSTo use HTML to format text in SSRS it is important to change the placeholder properties (right click on to the placeholder). In the placeholder properties change the markup type to HTML.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-MM_K-RbwlYg/T2mIdd4RghI/AAAAAAAAAJo/OKm4n8fsUcw/s1600/placeholderProperties.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="291" src="http://3.bp.blogspot.com/-MM_K-RbwlYg/T2mIdd4RghI/AAAAAAAAAJo/OKm4n8fsUcw/s320/placeholderProperties.png" width="320" /></a></div>
<br />
After that it is possible to format text with HTML Tags. The following list of HTML Tags shows possible Tags that can be used in an SSRS control:<br />
<ul>
<li>Hyperlinks: <A href></li>
<li>Fonts: <FONT></li>
<li>Header, style and block elements: <H{n}>, <DIV>, <SPAN>,<P>, <DIV>, <LI>, <HN></li>
<li>Text format: <B>, <I>, <U>, <S></li>
<li>List handling: <OL>, <UL>, <LI></li>
</ul>
For further information check out the following MSDN Page about <a href="http://msdn.microsoft.com/en-us/library/cc645967.aspx" target="_blank">Formatting Text and importing HTML</a>.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-6635516164230138483?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-63056066237706300522012-02-03T15:44:00.000+01:002012-02-03T15:44:17.527+01:002012-02-03T15:44:17.527+01:00Empty AX 2012 Project with all main nodes<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-uolraEoe4bA/Tyvs3C3RPWI/AAAAAAAAAJM/tDVg19OxH7E/s1600/EmptyAX2012Projects.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-uolraEoe4bA/Tyvs3C3RPWI/AAAAAAAAAJM/tDVg19OxH7E/s320/EmptyAX2012Projects.png" width="106" /></a></div>
To get an empty project with the AOT tree-nodes you can use this project:<br /><br /><a href="http://www.thomaswilke.net/test/SharedProject_AX2012Project.xpo" target="_blank">EmptyProject.XPO</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-6305606623770630052?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-71184156763339641282012-02-02T12:54:00.002+01:002012-02-02T12:54:34.117+01:002012-02-02T12:54:34.117+01:00Change SSRS Report to orientation to landscapeIf you need to change the orientation of a report to landscape or to a different format like letter or DIN A4 there is a real easy way. But you'll have to know this way :)<br />
<br />
Right click on the background beside the report and select report properties. (or in german: Berichtseigenschaften...)<br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-9-GGTBrM24U/Typ5RorFbCI/AAAAAAAAAJE/GsxkPjvRREQ/s1600/reportproperties.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="164" src="http://1.bp.blogspot.com/-9-GGTBrM24U/Typ5RorFbCI/AAAAAAAAAJE/GsxkPjvRREQ/s320/reportproperties.png" width="320" /></a></div>
<br />Than the following form opens where it's possible to change the orientation, the size and so on...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-WSFi_Q9RKF8/Typ33i0UaeI/AAAAAAAAAI8/btYI7d-e3ak/s1600/orientation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://2.bp.blogspot.com/-WSFi_Q9RKF8/Typ33i0UaeI/AAAAAAAAAI8/btYI7d-e3ak/s320/orientation.png" width="320" /></a></div>
<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-7118415676333964128?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-81416734878845057762012-01-26T14:27:00.001+01:002012-01-26T16:22:55.522+01:002012-01-26T16:22:55.522+01:00SSRS Insert new field error - field token is invalid<br />
If you get this error message:<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">Field token Fields!MyNewField.Value is invalid. Could not find the identifier.<span class="Apple-tab-span" style="white-space: pre;"> </span>\SSRS\Reports\Reports\</span><br />
<div>
<br /></div>
<div>
when you try to add a new field from AX to a SSRS Report.<br />
<br />
The first thing to do is to refresh the datasets in VisualStudio.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-eFmNBh0OprA/TyFUiNi06eI/AAAAAAAAAIs/L1pUmA5WbPs/s1600/Greenshot_2012-01-23_10-36-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="171" src="http://2.bp.blogspot.com/-eFmNBh0OprA/TyFUiNi06eI/AAAAAAAAAIs/L1pUmA5WbPs/s320/Greenshot_2012-01-23_10-36-26.png" width="320" /></a></div>
<div>
<br />
After that you should check the Query property of the DS. If there is a fieldlist in the select statement. Just click into the property and open the "Select a Microsoft Dynamics AX Report Data Provider" Dialog. Select the required DataProvider Class and click Next. Than you'll get the possibility to select some or all fields from the tables that are provided by the DP class.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-Mq_q-M3tjLY/TyFvRMT1idI/AAAAAAAAAI0/JiIccGCyHzU/s1600/SalesQuotationConfirmationReport+-+Microsoft+Visual+Studio+%2528Administrator%2529_2012-01-26_16-14-54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-Mq_q-M3tjLY/TyFvRMT1idI/AAAAAAAAAI0/JiIccGCyHzU/s320/SalesQuotationConfirmationReport+-+Microsoft+Visual+Studio+%2528Administrator%2529_2012-01-26_16-14-54.png" width="305" /></a></div>
<br /></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-8141673487884505776?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-85519626289813311962012-01-19T17:22:00.005+01:002012-01-19T17:22:56.844+01:002012-01-19T17:22:56.844+01:00Workflow links - ax 2012<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/cc585061.aspx" target="_blank">Implementing Workflow for Microsoft Dynamics AX</a>
</li>
<li><a href="http://msdn.microsoft.com/en-us/library/cc641259.aspx" target="_blank">Walkthrough: Creating a Workflow Type [AX 2012]</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/cc653399.aspx">Walkthrough: Adding Workflow to an Existing Form</a>
</li>
<li><a href="http://msdn.microsoft.com/en-us/library/cc585944.aspx" target="_blank">Walkthrough: Creating a Workflow with a Task and an Approval</a>
</li>
<li><a href="http://msdn.microsoft.com/en-us/library/gg862506.aspx" target="_blank">Walkthrough: Adding an Automated Task to a Workflow</a>
</li>
</ul>
<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-8551962628981331196?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-76928808993431809802012-01-11T13:30:00.001+01:002012-03-12T13:48:43.748+01:002012-03-12T13:48:43.748+01:00Open Visual Studio with another AX configurationIf you need to start Visual Studio connected to another AOS there are two ways to do this:<br />
<br />
<br />
<ol>
<li><b>Create a shortcut:</b><br /><br />add the/AxConfig command in the Target field:<br />"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /AxConfig NameOfClientConfig<br />or <br />"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /AxConfig C:\AX2012ClientConfig\ClientConfig.axc<br /></li>
<li><b>CommandLine:</b></li>
you can use the commands as shown above.</ol><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-7692880899343180980?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0tag:blogger.com,1999:blog-4241238080863808071.post-37484069299397624502012-01-10T16:43:00.000+01:002012-01-10T16:43:42.866+01:002012-01-10T16:43:42.866+01:00Dynamics AX 2012 SSRS links<br />
<ul>
<li><a href="http://www.microsoft.com/download/en/details.aspx?id=27725" target="_blank">White Paper: Report Programming Model</a></li>
<li><a href="http://technet.microsoft.com/en-us/library/ee873263.aspx" target="_blank">Reporting</a></li>
<li><a href="http://technet.microsoft.com/en-us/library/gg731917.aspx" target="_blank">How to: Use a Report Data Provider Class in a Report [AX 2012]</a></li>
<li><a href="http://technet.microsoft.com/en-us/library/hh389764.aspx" target="_blank">Configure the new Reporting Services instance [AX 2012]</a></li>
</ul><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4241238080863808071-3748406929939762450?l=thomaswilke.blogspot.com' alt='' /></div>TWInoreply@blogger.com0