<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>AsaIAm</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/" />
    <link rel="self" type="application/atom+xml" href="http://asaiam.com/atom.xml" />
    <id>tag:asaiam.com,2010-05-02://1</id>
    <updated>2010-10-09T07:35:54Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 5.01</generator>

<entry>
    <title>Custom Functions - Generate GUID and NULL Return - CastIron</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/castiron/2010/10/custom-functions---generate-guid-and-null-return.html" />
    <id>tag:asaiam.com,2010:/castiron//3.15</id>

    <published>2010-10-09T07:14:08Z</published>
    <updated>2010-10-09T07:35:54Z</updated>

    <summary>I had a could things I needed for a project that weren&apos;t standard in the functions list. I googled around and snagged some java script code that works just fine and made a custom function that I reuse across many...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/castiron/">
        <![CDATA[I had a could things I needed for a project that weren't standard in the functions list. I googled around and snagged some java script code that works just fine and made a custom function that I reuse across many of my projects. Here is a quick tutorial and example of code.<br /><br />-Asa<br /><br />1. Create a new custom function.<br /><br /><a href="http://asaiam.com/castiron/assets_c/2010/10/CustomFunctionMenu-12.html"><img src="http://asaiam.com/castiron/assets_c/2010/10/CustomFunctionMenu-thumb-267x321-12.jpg" alt="CustomFunctionMenu.JPG" class="mt-image-left" style="float: left; margin: 0pt 20px 20px 0pt;" width="267" height="321" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />2. Give the custom function a name. There is no input parameter required<br /><br /><a href="http://asaiam.com/castiron/assets_c/2010/10/CustomFunctionParameters-15.html"><img src="http://asaiam.com/castiron/assets_c/2010/10/CustomFunctionParameters-thumb-407x450-15.jpg" alt="CustomFunctionParameters.JPG" class="mt-image-left" style="float: left; margin: 0pt 20px 20px 0pt;" width="407" height="450" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />3. Enter the code as shown below, which will return a valid guid to any string variable.<br /><br /><a href="http://asaiam.com/castiron/assets_c/2010/10/CustomFunction-18.html"><img src="http://asaiam.com/castiron/assets_c/2010/10/CustomFunction-thumb-409x452-18.jpg" alt="CustomFunction.JPG" class="mt-image-left" style="float: left; margin: 0pt 20px 20px 0pt;" width="409" height="452" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Code:<br /><br />var s = [], itoh = '0123456789ABCDEF';<br /><br />&nbsp; for (var i = 0; i &lt;36; i++) s[i] = Math.floor(Math.random()*0x10);<br /><br />&nbsp; s[14] = 4; <br />&nbsp; s[19] = (s[19] &amp; 0x3) | 0x8; <br /><br />&nbsp; for (var i = 0; i &lt;36; i++) s[i] = itoh[s[i]];<br /><br />&nbsp; s[8] = s[13] = s[18] = s[23] = '-';<br /><br />&nbsp; return s.join('');<br /><br /><div><br /></div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Visitors - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/09/visitors.html" />
    <id>tag:asaiam.com,2010:/programming//2.12</id>

    <published>2010-09-19T04:44:15Z</published>
    <updated>2010-09-19T04:52:05Z</updated>

    <summary>Hello to anyone visiting,I was looking through some logs and noticed a few request for articles, tutorials and files that I had on the site previously. I removed these and decided to use a packaged CMS system instead of my...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        <![CDATA[Hello to anyone visiting,<br /><br />I was looking through some logs and noticed a few request for articles, tutorials and files that I had on the site previously. I removed these and decided to use a packaged CMS system instead of my custom built one. I apologize for this, I did some searching and found links and articles referring to my site, I have to admit it made me smile. I will be republishing the pages and files under a new category and placing redirects on the previous pages. Thank you for visiting and feel free to contact me if there is anything you need but don't find.<br /><br />Thanks,<br />-Asa<br />]]>
        
    </content>
</entry>

<entry>
    <title>Webservice Return Msg - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/09/Dynamics-AX-Webservice-Return-Msg.html" />
    <id>tag:asaiam.com,2010:/programming//2.9</id>

    <published>2010-09-18T07:23:42Z</published>
    <updated>2010-09-18T07:48:22Z</updated>

    <summary>In the CustomerService webservice class CustCustomerService the update service doesn&apos;t return a value. This means any programming consuming this service can not wait for a return to verify the call was successful. The create service does return a value, so...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
        <category term="CastIron" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MS Dynamics AX" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        <![CDATA[In the CustomerService webservice class CustCustomerService the update service doesn't return a value. This means any programming consuming this service can not wait for a return to verify the call was successful. The create service does return a value, so you can piggy back off this same methodology. It is possible this is corrected in more recent roll ups, as I believe my system is still on RU1.<br /><br /><b>Original Code</b> - As you see there is no return value, thus no way to make your service monitor for success.<br /><blockquote>public void update(AifEntityKeyList _entityKeyList, CustCustomer _custCustomer)<br />{<br /><blockquote>this.updateList(_entityKeyList, _custCustomer);<br /></blockquote>}<br /></blockquote><br /><b>Modified Code</b> - Below I have changed the structure slightly to follow the create structure. I added a local copy of the method UpdateList from class AifDocumentService to the CustCustomerService class and change it slightly to return the aifEntityKeyList.<br /><blockquote>public AifEntityKeyList update(AifEntityKeyList _entityKeyList, CustCustomer _custCustomer)<br />{<br /><blockquote>return this.updateListReturn(_entityKeyList, _custCustomer);<br /></blockquote>}<br /></blockquote>Local modified AifDocumentService UpdateList method <blockquote>protected AifEntityKeyList updateListReturn(AifEntityKeyList entityKeyList, AifDocument document)<br />{<br />&nbsp;&nbsp;&nbsp; AifResult aifResult;<br />&nbsp;&nbsp;&nbsp; AxdBase axdBase;<br />&nbsp;&nbsp;&nbsp; AifEndpointActionPolicyInfo endpointActionPolicyInfo;<br />&nbsp;&nbsp;&nbsp; ;<br /><br />&nbsp;&nbsp;&nbsp; if (entityKeyList == null)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw error(strfmt("@SYS91439", 'entityKeyList'));<br />&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp; if (document == null)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw error(strfmt("@SYS91439", 'document'));<br />&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp; axdBase = document.getAxdInstance();<br />&nbsp;&nbsp;&nbsp; endpointActionPolicyInfo = this.getEndpointActionPolicy(document);<br /><br />&nbsp;&nbsp;&nbsp; this.setAifFaultContext(#UpdateServiceOperationMethodName);<br /><br />&nbsp;&nbsp;&nbsp; constraintListCollection = new AifConstraintListCollection();<br /><br />&nbsp;&nbsp;&nbsp; aifResult = axdBase.updateList(entityKeyList, document.serialize(), endpointActionPolicyInfo, constraintListCollection);<br />&nbsp;&nbsp;&nbsp; correlationEntityKeys = aifResult.parmEntityKeyList();<br /><br />&nbsp;&nbsp;&nbsp; return correlationEntityKeys;<br />}<br /></blockquote><br /><br />]]>
        
    </content>
</entry>

<entry>
    <title>Implementation - Complete - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/06/implementation---complete.html" />
    <id>tag:asaiam.com,2010:/programming//2.8</id>

    <published>2010-06-07T00:34:16Z</published>
    <updated>2010-10-08T18:32:08Z</updated>

    <summary>The title may be somewhat of a lie, but it&apos;s a hell of an accomplishment to have synced that many accounts in a weekend. In total I have 107,000 accounts now synced and syncing future updates live. I consider this...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        <![CDATA[The title may be somewhat of a lie, but it's a hell of an accomplishment to have synced that many accounts in a weekend. In total I have 107,000 accounts now synced and syncing future updates live. <br /><br />I consider this a pretty big milestone, this is a system I have been working on for a very long time. Many 130+ hr/weeks and I had some home issues during the process, but here I am looking at the end of phase one.<br /><br /><a href="http://asaiam.com/dynamicsax/assets_c/2010/06/DynamicsAXLogo-1.html"><img src="http://asaiam.com/dynamicsax/assets_c/2010/06/DynamicsAXLogo-thumb-232x45-1.jpg" alt="DynamicsAXLogo.jpg" class="mt-image-center" style="text-align: center; display: block; margin: 0pt auto 20px;" height="45" width="232" /></a><br />MS Dynamics AX: Amazing internal ERP system, I've been programming this application for 5 years and love every minute of it. <br /><br /><br /><a href="http://asaiam.com/dynamicsax/assets_c/2010/06/castiron-4.html"><img src="http://asaiam.com/dynamicsax/assets_c/2010/06/castiron-thumb-232x162-4.jpg" alt="castiron.jpg" class="mt-image-center" style="text-align: center; display: block; margin: 0pt auto 20px;" height="92" width="132" /></a><br />Cast Iron Systems: Excellent mechanism for connecting disparent systems and just making complex stuff easy in general.<br /><br /><br /><div><a href="http://asaiam.com/dynamicsax/assets_c/2010/06/salesforce-logo-7.html"><img src="http://asaiam.com/dynamicsax/assets_c/2010/06/salesforce-logo-thumb-232x63-7.jpg" alt="salesforce-logo.jpg" class="mt-image-center" style="text-align: center; display: block; margin: 0pt auto 20px;" height="63" width="232" /></a><br />Salesforce.com: While I personally would have built our system using enterprise portal to expose MS Dynamics, Salesforce is a very nice CRM system. Its' API is easy to work with and as the market leader in cloud CRM it is very well documented and robustly integrated.<br /><br /><br />-Asa<br /></div><div><br /><br /><br /></div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Implementation - Final Day - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/06/implementation---final-day.html" />
    <id>tag:asaiam.com,2010:/programming//2.7</id>

    <published>2010-06-06T17:32:17Z</published>
    <updated>2010-06-06T17:35:56Z</updated>

    <summary>It&apos;s going much better today.2:1 API calls to records, this is much better and should allow me to stay within safe api call range.I actually have very little left to do.1. Finish syncing about 40k records which should take 100k...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
        <category term="CastIron" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MS Dynamics AX" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="SalesForce" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        <![CDATA[It's going much better today.<br /><br />2:1 API calls to records, this is much better and should allow me to stay within safe api call range.<br /><br />I actually have very little left to do.<br /><br />1. Finish syncing about 40k records which should take 100k api calls. I currently have about 150k free.<br /><br />2. Download local db copy and update dynamics ax with the salesforce account id's.<br /><br />3. Start all orchestrations in castiron to LIVE sync.<br /><br />4. Start all batches and batch jobs back up<br /><br />5. Start other AOS'<br /><br />6. Test<br /><br />7. Sleep lol<br /><br />Hopefully the next entry says complete<br /><br />]]>
        
    </content>
</entry>

<entry>
    <title>Implementation - Frustration - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/06/implementation---frustration.html" />
    <id>tag:asaiam.com,2010:/programming//2.6</id>

    <published>2010-06-06T01:42:58Z</published>
    <updated>2010-06-06T05:12:33Z</updated>

    <summary>Wouldn&apos;t it be great if things went according to plan. All was running fantastic, better than could be expected or at least it seemed. Then I wake up from a power nap to find 9000 emails confirming what I expected...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
        <category term="CastIron" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MS Dynamics AX" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="SalesForce" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        <![CDATA[Wouldn't it be great if things went according to plan. All was running fantastic, better than could be expected or at least it seemed. Then I wake up from a power nap to find 9000 emails confirming what I expected to happen from the beginning, I had used more than the Salesforce api call limit, which they raised to 300k per 24 hours, but was still a fraction of what I needed. So I am dead in the water for 24 hours and will not be able to finish the contact sync. I am going to rescue the account sync by syncing only the remaining delta accounts, around 50k. I made some modifications to cut the api call usage further and now some fun scripting and I know which accounts are the deltas. I will have Dynamics AX dump out the xml files for these accounts shortly and then be ready to sync them as the api calls free up. I will batch them to complete the rest and will still end this process strong.<br /><br />Assuming I can rescue accounts, I will handle contacts live but syncing batches each day. This will fix all the SFDC contacts, but the ax contacts will need to be synced up and that will be a little more complicated. Both will handle correctly if they are manually edited or used, but I will script the sync of the deltas over a few days.<br /><br />&nbsp; <br />]]>
        
    </content>
</entry>

<entry>
    <title>Implementation - Finally??? - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/06/implementation---finally.html" />
    <id>tag:asaiam.com,2010:/programming//2.5</id>

    <published>2010-06-05T07:01:26Z</published>
    <updated>2010-06-06T05:14:20Z</updated>

    <summary>The big question is can it be done in a weekend!!!I started tinkering and building on this massive monstrosity of a project about 10 months ago. I didn&apos;t think it would happen at times, either the company getting sick of...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
        <category term="CastIron" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MS Dynamics AX" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="SalesForce" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        <![CDATA[The big question is can it be done in a weekend!!!<br /><br />I started tinkering and building on this massive monstrosity of a project about 10 months ago. I didn't think it would happen at times, either the company getting sick of waiting, me losing my mind or it just not being feasible. Well here we are ready to release the largest portion of the system, other parts have been running flawlessly for months and one piece is left to be finished. There are about 100,000 accounts and 80,000 contacts to sync in a weekend, friday night to sunday afternoon, leaving enough time to restore backups if there are problems. Fun huh? <br /><br />I'm going to document the process as much as my insomnia will allow.<br /><br />1. Servers and systems were backed up and verified.<br /><br />2. Start a single Microsoft Dynamics AX AOS that normal users do not access to work from and ensure all other AOS's are turned off. <br /><br />3. Turn off all batch jobs and remove batch servers.<br /><br />4. To minimize the amount of API calls I am making to salesforce and to increase processing speed I pull a copy of the salesforce tables down to a local MS SQL server and do the mass of the hard processing there, for the initial sync at least.<br /><br />5. Start the class that processes the Salesforce.com accounts into Dynamics AX, this is a lengthy process and has to be monitiored for random error that occurs when an address is incorrect or the zipcode / counties tables in Dynamics AX are missing a value.<br /><br />I would receive the same error no matter how the address record is created but in this instance I am creating the address from a webservice I created, that allows some extended functions you do not get with the normal CustCustomerService webservice that comes with Dynamics AX. Since there was no way to update an address of an account in the standard CustCustomerService webservice I had to create a custom one. <br /><br /><blockquote>AddressService.createList<br />Line=1, Pos=315, Xpath=/AddressService/DirRel[1]/DirMap[1]/Address[1]<br />The value 'VENTURA' in field 'County' is not found in relating table 'Counties'.<br />Error found when validating record.<br />Creation has been canceled.<br />Document Address Service could not be created<br /></blockquote>I don't really do anything at this stage for those records that error. I will catch them after as they will be missing an address record and that is a requirement of the sync process. The process is currently about 1/3rd complete, well the creation of the 38,000 Salesforce.com accounts into Dynamics, it does it direct from the sql db into custom Dynamics AX classes so it is somewhat fast, still takes 4 hours or so.<br /><br />6. Next I will start on the output of the files from Dynamics AX and syncing to Salesforce.com. This is the full 106,000 accounts and is a very slow process, so maybe I can get some sleep then.<br /><br />...More updates to come as long as the process goes well. lol<br />]]>
        
    </content>
</entry>

<entry>
    <title>First integration sync run - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/05/first-integration-sync-run.html" />
    <id>tag:asaiam.com,2010:/programming//2.4</id>

    <published>2010-05-16T04:52:09Z</published>
    <updated>2010-05-16T04:55:14Z</updated>

    <summary>This is my first attempt at synchronizing all the files between MS Dynamics AX and Salesforce.com, they must be synced a first time before the normal processing can begin.The process is as follows1. Process all the records out of AX...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        <![CDATA[This is my first attempt at synchronizing all the files between MS 
Dynamics AX and Salesforce.com, they must be synced a first time before 
the normal processing can begin.<br /><br />The process is as follows<br />1. 
Process all the records out of AX as files = 7hrs<br />2. Let Cast Iron 
process the 78,000 files as updates or inserts to salesforce.com <br />&nbsp;- 
Started processing at 6pm and as of midnight there are 10000 files 
remaining = 8hrs<br />3. Pull all the records down from Salesforce.com to a
 local MSSQL DB. = 2hrs<br />4. Run stored procedure to update all ax 
records with salesforce record id / parent salesforce record id / parent
 ax account num = 5min<br />5. Take delta of which accounts have not been 
created in AX roughly 20,000 = 5min<br />6. Process those through stored 
procedures directly into AX DB and Update local Salesforce.com DB with 
which accounts updated. = ?<br />7. Produce files for those from local 
Salesforce.com DB = 1hrs<br />8. Let Cast Iron process the 20,000 files as
 updates 2hrs<br />9. Pull all the records down from Salesforce.com to a 
local MSSQL DB. = 
2hrs<br />10. Run stored procedure to update all ax records with 
salesforce record id
 / parent salesforce record id / parent ax account num<br />11. Run stored
 procedure to show all accounts are synced from both systems<br />12. Test
 sync is working<br />13. Sing and Drink<br />14. Finish Sales Quotations]]>
        
    </content>
</entry>

<entry>
    <title>Salesforce.com MS Dynamics AX Integration Using Castiron - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/05/salesforcecom-ms-dynamics-ax-integration-using-castiron.html" />
    <id>tag:asaiam.com,2010:/programming//2.3</id>

    <published>2010-05-16T04:47:29Z</published>
    <updated>2010-05-16T04:49:28Z</updated>

    <summary>Yeah I know, its the longest title I could possible come up with. For the last 9+ months I have been working, in addition to my normal MS Dynamics developer position, on a project to integrate MS Dynamics AX with...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        Yeah I know, its the longest title I could possible come up with. For 
the last 9+ months I have been working, in addition to my normal MS 
Dynamics developer position, on a project to integrate MS Dynamics AX 
with SalesForce.com. I have been developing this primarily using an 
integration appliance from Cast Iron Systems. This project was 
originally slated to take a month, maybe a few, but never going on a 
year. The primary problems lie in what was trying to be accomplished, 
lack of planning and physical limitations of the systems, but the 
project is working great thus far aside from the time line disaster and 
will soon be finished. I have plans to document many of the 
problems/hurdles I have run into. It maybe a slow process as the 
integration is just finally starting to be released into production, but
 this maybe of assistance to any integration into MS Dynamics. This has 
been the largest project I have ever been the Lead and well only 
developer working on for its entirety and I am proud of where it has 
come to this point.
        
    </content>
</entry>

<entry>
    <title>Integration - Dynamics AX</title>
    <link rel="alternate" type="text/html" href="http://asaiam.com/dynamicsax/2010/05/integration.html" />
    <id>tag:asaiam.com,2010:/programming//2.2</id>

    <published>2010-05-03T07:41:25Z</published>
    <updated>2010-05-03T07:50:13Z</updated>

    <summary>I&apos;m going to try to do some documenting of the different problems and issues I have while integrating different systems. I spend my days working through issues that do not have solutions on the internet. I always intend to post...</summary>
    <author>
        <name>AsA</name>
        
    </author>
    
        <category term="CastIron" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MS Dynamics AX" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="SalesForce" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://asaiam.com/dynamicsax/">
        I&apos;m going to try to do some documenting of the different problems and issues I have while integrating different systems. I spend my 
days working through issues that do not have solutions on the internet. I
 always intend to post the little odds and ends that when found make 
life so much easier, but alas I never get around to it. This has always 
been primarily due to the complexity of posting on the cms system I had 
designed over the last few years. It was a great learning experience, 
but in the end the system was not up to snuff. I am in the process of 
trying different cms systems. Currently as you see I am trying Movable 
Type, which seems easy to use, but customization is a nightmare and 
features appear limited.  
        
    </content>
</entry>

</feed>

