<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KomKid.Net &#187; Axapta</title>
	<atom:link href="http://www.komkid.net/category/axapta/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.komkid.net</link>
	<description>คิดแตกต่าง แต่ไม่แตกแยก คิดแปลก แตกต่างอย่างมีเหตุผล</description>
	<lastBuildDate>Thu, 18 Feb 2010 01:46:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Axapta : Posting journal by code</title>
		<link>http://www.komkid.net/2010/02/axapta-posting-journal-by-code/</link>
		<comments>http://www.komkid.net/2010/02/axapta-posting-journal-by-code/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 13:00:58 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MorphX]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=754</guid>
		<description><![CDATA[123456789101112131415161718static void InventJournalCheckPost&#40;Args _args&#41;
&#123;
InventJournalTable &#160; &#160; &#160;inventJournalTable;
InventJournalCheckPost &#160;journalCheckPost; &#160; &#160;
;
ttsbegin;
inventJournalTable = &#160;InventJournalTable::find&#40;&#34;xxx&#34;,true&#41;;
//Remove Journal &#34;xxx&#34; has not been locked by system
inventJournalTable.SystemBlocked = true;
inventJournalTable.update&#40;&#41;;

journalCheckPost &#160; = &#160;InventJournalCheckPost::newJournalCheckPost &#160;&#40;JournalCheckPostType::Post,inventJournalTable&#41;;
journalCheckPost.run&#40;&#41;;

inventJournalTable.SystemBlocked = false;
inventJournalTable.update&#40;&#41;;
ttscommit;
&#125;
]]></description>
		<wfw:commentRss>http://www.komkid.net/2010/02/axapta-posting-journal-by-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta : Firewall config</title>
		<link>http://www.komkid.net/2010/01/axapta-firewall-config/</link>
		<comments>http://www.komkid.net/2010/01/axapta-firewall-config/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 14:17:58 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Port]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=729</guid>
		<description><![CDATA[เราสามารถตั้งค่า Axapta ให้ใช้งานผ่าน Windows Firewall ได้โดยตั้งค่า port ที่ AOS ดังรูป

ในส่วนของ Client Config ก็ตั้งค่าในส่วนของ advance ดังรูป

แล้วก็ไป add port เพิ่มใน Windows Firewall

]]></description>
		<wfw:commentRss>http://www.komkid.net/2010/01/axapta-firewall-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta : Detecting Type of Variable</title>
		<link>http://www.komkid.net/2009/12/axapta-detecting-type-of-variable/</link>
		<comments>http://www.komkid.net/2009/12/axapta-detecting-type-of-variable/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 15:19:54 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=721</guid>
		<description><![CDATA[12345678910111213static void typeDetect&#40;Args _args&#41;
&#123;
DictType &#160; &#160;dictType;
;

print &#34;This ID is the TypeId, not the EDT ID - &#34;, typeId&#40;ItemId&#41;;
print &#34;This ID is what we need - &#34;, typeId2ExtendedTypeId&#40;typeId&#40;ItemId&#41;&#41;;
print &#34;This ID is wrong - &#34;, new DictType&#40;typeId&#40;ItemId&#41;&#41;.id&#40;&#41;;
dictType = new DictType&#40;typeId2ExtendedTypeId&#40;typeId&#40;ItemId&#41;&#41;&#41;;
print &#34;This ID is correct - &#34;, dictType.id&#40;&#41;;
print dictType.name&#40;&#41;;
pause;
&#125;
]]></description>
		<wfw:commentRss>http://www.komkid.net/2009/12/axapta-detecting-type-of-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta : Find for update</title>
		<link>http://www.komkid.net/2009/12/axapta-find-for-update/</link>
		<comments>http://www.komkid.net/2009/12/axapta-find-for-update/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 22:44:17 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=693</guid>
		<description><![CDATA[ปกติจะ update ทีนึง ก็ใช้ select forupdate เพิ่งรู้ว่าทำแบบนี้ได้ด้วย
ใช้ static method ที่ชื่อ find ซึ่ง table ส่วนใหญ่จะมีอยู่แล้ว แล้วก็ใส่ parameter forupdate เป็น true
12345678910static void FindForUpdate&#40;Args _args&#41;
&#123;
&#160; &#160; EmplTable myRow;
&#160; &#160; ;
&#160; &#160; ttsbegin;
&#160; &#160; myRow = EmplTable::find&#40;'0154-3',true&#41;;
&#160; &#160; myRow.Name ='Nikom';
&#160; &#160; myRow.update&#40;&#41;;
&#160; &#160; ttscommit;
&#125;
]]></description>
		<wfw:commentRss>http://www.komkid.net/2009/12/axapta-find-for-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta : Open OpenOffice document and Save as</title>
		<link>http://www.komkid.net/2009/11/axapta-open-openoffice-document-and-save-as/</link>
		<comments>http://www.komkid.net/2009/11/axapta-open-openoffice-document-and-save-as/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 13:57:23 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[OpenOffice]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=619</guid>
		<description><![CDATA[123456789101112131415161718192021222324252627282930&#160; &#160; COM OpenOffice;
&#160; &#160; COM oDeskTop;
&#160; &#160; COM oDocument;
&#160; &#160; COMVariant arg;
&#160; &#160; COMVariant byte;
&#160; &#160; Array Arr = new Array&#40;Types::Class&#41;;
&#160; &#160; Array oArr = new Array&#40;Types::Class&#41;;
&#160; &#160; str url,outFile;
&#160; &#160; COM FileProperties;
;
&#160; &#160; OpenOffice = new Com&#40;&#34;com.sun.star.ServiceManager&#34;&#41;;
&#160; &#160; oDeskTop = OpenOffice.CreateInstance&#40;&#34;com.sun.star.frame.Desktop&#34;&#41;;
&#160;
// #############################################################
// เปิดไฟล์
&#160; &#160; arg = comVariant::createFromArray&#40;Arr&#41;;
&#160; &#160; url = &#34;file://Axaptaserver/AxaptaSP4/Excel/Losses.xls&#34;;
&#160; &#160; oDocument [...]]]></description>
		<wfw:commentRss>http://www.komkid.net/2009/11/axapta-open-openoffice-document-and-save-as/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta : Get next number sequence</title>
		<link>http://www.komkid.net/2009/10/axapta-get-next-number-sequence/</link>
		<comments>http://www.komkid.net/2009/10/axapta-get-next-number-sequence/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 21:01:15 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MorphX]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=613</guid>
		<description><![CDATA[การเรียกใช้ Number sequence สำหรับ running no. ต่าง ๆ ทำได้โดยใช้คำสั่ง 
NumberSeq::newGetNum(ProdParameters::numRefProdJournalId()).num();
ตรง Parameter ก็เปลี่ยนไปขึ้นอยู่ว่าเป็น Number sequence ของ Module ไหน
และจะใช้งานได้ Number sequence ต้องไม่ตั้งค่าให้เป็น Continuous
123456&#160; &#160; &#160;JournalId &#160; &#160; &#160; &#160; &#160;myJournalId;
&#160; &#160; &#160; ;
&#160; &#160; &#160;myJournalId = NumberSeq::newGetNum&#40;ProdParameters::numRefProdJournalId&#40;&#41;&#41;.num&#40;&#41;;
&#160; &#160; &#160;myJournalId = NumberSeq::newGetNum&#40;PurchParameters::numRefPurchaseOrderId&#40;&#41;&#41;.num&#40;&#41;;
&#160; &#160; &#160;myJournalId = NumberSeq::newGetNum&#40;InventParameters::numRefInventJournalId&#40;&#41;&#41;.num&#40;&#41;;
&#160; &#160; &#160;myJournalId = NumberSeq::newGetNum&#40;SalesParameters::numRefConfirmId&#40;&#41;&#41;.num&#40;&#41;;
การตั้งค่า Number sequence ของแต่ละ module เข้าไปที่ Setup -> Parameters [...]]]></description>
		<wfw:commentRss>http://www.komkid.net/2009/10/axapta-get-next-number-sequence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Axapta : Formatting style in Excel</title>
		<link>http://www.komkid.net/2009/10/axapta-formatting-style-in-excel/</link>
		<comments>http://www.komkid.net/2009/10/axapta-formatting-style-in-excel/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 20:55:16 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MorphX]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=612</guid>
		<description><![CDATA[12345678910111213141516171819202122232425262728293031323334static void ExcelFormating&#40;Args _args&#41;
&#123;
&#160; &#160; #Excel
&#160;
&#160; &#160; SysExcelApplication &#160; &#160; &#160; &#160; excel;
&#160; &#160; SysExcelWorkbooks &#160; &#160; &#160; &#160; &#160; books;
&#160; &#160; SysExcelWorkbook &#160; &#160; &#160; &#160; &#160; &#160;book;
&#160; &#160; SysExcelWorksheet &#160; &#160; &#160; &#160; &#160; sheet;
&#160; &#160; SysExcelRange &#160; &#160; &#160; &#160; &#160; &#160; &#160; range;
&#160; &#160; SysExcelStyles &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.komkid.net/2009/10/axapta-formatting-style-in-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta : Enable/Disable Dialog Control at runtime</title>
		<link>http://www.komkid.net/2009/10/axapta-enabledisable-dialog-control-at-runtime/</link>
		<comments>http://www.komkid.net/2009/10/axapta-enabledisable-dialog-control-at-runtime/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 16:23:59 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MorphX]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=604</guid>
		<description><![CDATA[วิธี Enable/Disable หรือ Dialog Control ในขณะ runtime ทำได้โดย ดังนี้

1.classDeclaration
1234567891011121314151617class SCI_Costing extends RunBase
&#123;
&#160; &#160; FormStringControl &#160; SalesIdCtrl, ItemIdCtrl;
&#160; &#160; FormCheckBoxControl bAllCtrl;

&#160; &#160; SalesId &#160; &#160; salesId;
&#160; &#160; ItemId &#160; &#160; &#160;itemId;
&#160; &#160; NoYes &#160; &#160; &#160; bAll;

&#160; &#160; #define.CurrentVersion&#40;1&#41;

&#160; &#160; #localmacro.CurrentList
&#160; &#160; &#160; &#160; salesId,
&#160; &#160; &#160; &#160; itemId,
&#160; &#160; &#160; &#160; bAll
&#160; &#160; #endmacro
&#125;
2.สร้าง dialog [...]]]></description>
		<wfw:commentRss>http://www.komkid.net/2009/10/axapta-enabledisable-dialog-control-at-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta : Get or Set Checkbox value</title>
		<link>http://www.komkid.net/2009/10/axapta-get-or-set-checkbox-value/</link>
		<comments>http://www.komkid.net/2009/10/axapta-get-or-set-checkbox-value/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 15:22:12 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MorphX]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=586</guid>
		<description><![CDATA[1234567891011121314151617181920212223242526272829public void clicked&#40;&#41;
&#123;
&#160; &#160; Qty &#160; &#160; tmpQty1;
&#160; &#160; Qty &#160; &#160; tmpQty2;
&#160; &#160; FormCheckboxControl formCheckboxControl;
&#160; &#160; ;
&#160;
&#160; &#160; super&#40;&#41;; // ต้องรัน super ก่อน ไม่งั้นค่าไม่เปลี่ยน
// รับค่าจาก design
&#160; &#160; formCheckboxControl = element.design&#40;&#41;.control&#40;control::ProdParmHistoricalCost_EndJob&#41;; 
// &#160; box::info(strfmt(&#34;%1&#34;,formCheckboxControl.value()));
if&#40;formCheckboxControl.value&#40;&#41; == 1&#41;&#123; //ถ้า checked จะเป็น 1
&#160; &#160; tmpQty1 = ProdTable::find&#40;ProdParmHistoricalCost.ProdId&#41;.QtySched;
&#160; &#160; tmpQty2 = ProdTableJour::reportedFinishedGood&#40;ProdParmHistoricalCost.prodId&#41;;
&#160;
&#160; &#160; if&#40;tmpQty1 != tmpQty2&#41;&#123;
&#160; &#160; &#160; &#160;if&#40;box::yesNo&#40;&#34;Sure?&#34;, [...]]]></description>
		<wfw:commentRss>http://www.komkid.net/2009/10/axapta-get-or-set-checkbox-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta : Dialog with lookup control</title>
		<link>http://www.komkid.net/2009/10/axapta-dialog-with-lookup-control/</link>
		<comments>http://www.komkid.net/2009/10/axapta-dialog-with-lookup-control/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 14:21:47 +0000</pubDate>
		<dc:creator>Komkid</dc:creator>
				<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MorphX]]></category>

		<guid isPermaLink="false">http://www.komkid.net/?p=593</guid>
		<description><![CDATA[วิธีสร้าง dialog แบบที่มี control ซึ่ง lookup ได้ เช่น เลือก SalesId แล้วให้อีก control นึง คือ ItemId lookup มาเฉพาะของ SalesId นั้น

ทำได้ดังนี้
1.declare control ไว้ ตาม extended data type ที่จะใช้
1234class LookupDialog extends RunBase
&#123;
&#160; &#160; FormStringControl &#160; SalesIdCtrl, ItemIdCtrl; 
&#125;
2.สร้าง dialog
1234567891011121314151617protected Object dialog&#40;Dialog dialog, boolean forceOnClient&#41;
&#123;
&#160; &#160; DialogRunBase ret;
&#160; &#160; ;
&#160; &#160; ret = super&#40;dialog, forceOnClient&#41;;
&#160; &#160; ret.caption&#40;'Costing report by [...]]]></description>
		<wfw:commentRss>http://www.komkid.net/2009/10/axapta-dialog-with-lookup-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
