<?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>Off Shore Development India &#187; Extension development</title>
	<atom:link href="http://www.offshoresoftwaredevelopmentindia.com/blog/tag/extension-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.offshoresoftwaredevelopmentindia.com/blog</link>
	<description>Offshore Software Development India</description>
	<lastBuildDate>Wed, 25 Jan 2012 13:14:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create Extension for Microsoft Office Accounting</title>
		<link>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/08/01/create-application-extension-for-microsoft-office-accounting/</link>
		<comments>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/08/01/create-application-extension-for-microsoft-office-accounting/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 05:17:05 +0000</pubDate>
		<dc:creator>rupen</dc:creator>
				<category><![CDATA[.Net Development]]></category>
		<category><![CDATA[ASP.Net Frameworks]]></category>
		<category><![CDATA[C# Development]]></category>
		<category><![CDATA[Microsoft Office Accounting]]></category>
		<category><![CDATA[Create Application for MOA]]></category>
		<category><![CDATA[Custom Extension for MOA]]></category>
		<category><![CDATA[Extension development]]></category>
		<category><![CDATA[Microsoft Office Accounting Code]]></category>
		<category><![CDATA[MOA]]></category>
		<category><![CDATA[MOA create company]]></category>
		<category><![CDATA[MOA create invoice]]></category>
		<category><![CDATA[MOA customization]]></category>
		<category><![CDATA[MOA manage customers]]></category>
		<category><![CDATA[Office Accounting customization]]></category>

		<guid isPermaLink="false">http://www.offshoresoftwaredevelopmentindia.com/blog/?p=61</guid>
		<description><![CDATA[Dot Net team at OffshoreSoftwareDevelopmentIndia.com has created many Extensions for Microsoft Office Accounting. Here you will find how to create Microsoft Office Accounting extension.
Create Application Extension for Microsoft Office Accounting:
You can create your own application which can be integrated to your accounting company. You need to follow given steps for creating New Application which can [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Dot Net team at <span><span>OffshoreSoftwareDevelopmentIndia.com has created many Extensions for Microsoft Office Accounting. Here you will find how to create Microsoft Office Accounting extension.</span></span></p>
<p style="text-align: left;"><strong>Create Application Extension for Microsoft Office Accounting:</strong></p>
<p style="text-align: left;"><span><span>You can create your own application which can be integrated to your accounting company. You need to follow given steps for creating New Application which can be integrated to MOA.</span></span></p>
<p style="text-align: left;"><strong>Assumption:</strong> You might have created your company in MSOA and you have to pass company name in step &#8211; 9 at the place of &#8220;yourCompany.sbc&#8221;.</p>
<ol style="text-align: left;">
<li>Create Windows based Project.</li>
<li>You have to add references of following DLLS.
<ul>
<li><strong>ILoader:</strong> c:\WINDOWS\assembly\GAC_32\ILoader\2.0.5201.0__31bf3856ad364e35\ILoader.dll</li>
<li><strong>SBAIAPI:</strong> c:\Program Files\Microsoft Small Business\Small Business Accounting 2007\Assemblies\SBAIAPI.dll</li>
<li><strong>SBAIUI: </strong>c:\Program Files\Microsoft Small Business\Small Business Accounting 2007\Assemblies\SBAIUI.dll</li>
</ul>
</li>
<li style="text-align: left;">Now you need to Import two namespace for MOA
<ol style="text-align: left;">- using Microsoft.BusinessSolutions.SmallBusinessAccounting.UI;</ol>
<ol style="text-align: left;">-using Microsoft.BusinessSolutions.SmallBusinessAccounting;</ol>
</li>
<li style="text-align: left;"> Provide the Information related to your Loader
<ol>- const string loaderFULLNAME = &#8220;Loader, Version=2.0.5201.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&#8243;;</ol>
</li>
<li> Provide the details related to your Assembly
<ul style="text-align: left;">
<li>const string loaderNAMESPACE = &#8220;Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader&#8221;;</li>
</ul>
</li>
<li> Create object for ISmallBusinessInstance.(It is an interface so no needs to create  New Instance for this</li>
<li> Load the assembly which was initialized before.</li>
<p>Assembly assem = Assembly.Load(loaderFULLNAME);</p>
<li> Load the assembly which in your system using Loader</li>
<p>ILoader ldr = assem.CreateInstance(loaderNAMESPACE) as ILoader;</p>
<li style="text-align: left;"> Create string object and initialize with .sbc file which is stored in Your MYDocument. You can provide other path also.
<ul>
<li>string sbaFile = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) Path.DirectorySeparatorChar + &#8220;Small Business Accounting&#8221; Path.DirectorySeparatorChar + &#8220;Companies&#8221; + Path.DirectorySeparatorChar + &#8220;yourCompany.sbc&#8221;;</li>
</ul>
</li>
<li style="text-align: left;"> Load the file in your application using loader.</li>
<p>- sbi = ldr.GetSbaObjects(sbaFile).SmallBusinessInstance as ISmallBusinessInstance</p>
<li style="text-align: left;"> Now your sbi object (instance of SmallBusinessInstance) is ready to Use.</li>
</ol>
<p style="text-align: left;"><strong>Manage customer details using SmallBusinessInstance Object</strong></p>
<p style="text-align: left;">Now it&#8217;s time to implement SmallBusinessInstance object to access the details related to Customers. [sbi is an object of SmallBusinessInstance]</p>
<p style="text-align: left;"><strong>How to view existing customers?</strong></p>
<ul style="text-align: left;">
<li style="text-align: left;"> Create object of DataTable. And initialize the Details of sbi.CustomerAccounts.DataView.Table to the object of DataTable.</li>
</ul>
<ul style="text-align: left;">
<li style="text-align: left;"> You can use this DataTable object and assign that object to DataSource of GridView or ComboBox to view the details related to Customers.</li>
</ul>
<p style="text-align: left;"><strong>How to create  New Customers?</strong></p>
<ul style="text-align: left;">
<li style="text-align: left;"> Create an object of ICustomerAccount. And assign the value of sbi.CreateCustomerAccount(); ICustomerAccount cust = sbi.CreateCustomerAccount();</li>
</ul>
<ul style="text-align: left;">
<li> Now you can access the Properties on Customer Account (e.g. Name, Active);</li>
</ul>
<ul style="text-align: left;">
<li> You cannot access the property of Address, Email and Fax directly from this object you need to create the object of ICustomerVendorAddress , ICustomerVendorEmail and ICustomerVendorFax respectively
<ul>
<li style="text-align: left;"><strong> ICustomerVendorAddress:</strong> You have to create object of ICustomerVendorAddress and initialize it. ICustomerVendorAddress address = cust.CustomerVendorAddresses.GetByType(CustomerVendorAddressType.Business); where you can find different CustomerVendorAddressType. Like (Business, Home, Postal, etc) Now you can access the properties of Address.</li>
<li style="text-align: left;"> <strong>ICustomerVendorEmail:</strong> You have to create object of ICustomerVendorAddress and initialize it. ICustomerVendorEmail emailAddress = cust.CustomerVendorEmails.GetByType(CustomerVendorEmailType.Email1); where you can find different CustomerVendorEmailType. Like (Email1, Email2, and Email3). Now you can access the properties of Email</li>
<li style="text-align: left;"> <strong>ICustomerVendorFax:</strong> You have to create object of ICustomerVendorAddress and initialize it. ICustomerVendorFax faxNumber = cust.CustomerVendorFaxes.GetByType(CustomerVendorFaxType.Business); where you can find different CustomerVendorFaxType. Like (Business, Home and Other). Now you can access the properties of Fax.</li>
</ul>
</li>
<li> Now you can save the Customer. cust.Save();</li>
</ul>
<p style="text-align: left;"><strong>Manage Payment details using SmallBusinessInstance object</strong> Now you can implement the Payment module of customer in following ways.</p>
<p style="text-align: left;"><strong>How to Create New Payment for Customers?</strong></p>
<ul style="text-align: left;">
<li>For payment of customer you have to specify for which customer you need to make payment.</li>
<li>You need to provide AccountId of customer for Payment.</li>
<li>Create ICustomerAccount object and initialize it with sbi.CustomerAccounts<br />
ICustomerAccount cust = (ICustomerAccount)sbi.CustomerAccounts.GetByPrimaryKey(AccountID);</li>
<li>Create object of ICustomerPayment and initialize it with sbi.CreateCustomerPayment()<br />
ICustomerPayment payment = sbi.CreateCustomerPayment();</li>
<li>Now assign the value of payment.Customer as cust<br />
payment.Customer = cust;</li>
<li>Now provide the details of Amount.</li>
<li style="text-align: left;">And finally save the record<br />
payment.Save();</li>
</ul>
<p style="text-align: left;">Manage Invoice details using SmallBusinessInstance object. You can manage the details of Invoice using the APIs of Microsoft Accounting.</p>
<p style="text-align: left;"><strong>How to View existing Invoice?</strong></p>
<ul style="text-align: left;">
<li style="text-align: left;"> Create object of DataTable. And initialize the Details of sbi.SalesInvoices.DataView.Table to the object of DataTable.</li>
<li style="text-align: left;"> You can use this DataTable object and assign that object to DataSource of GridView or ComboBox to view the details related to Invoice.</li>
</ul>
<p style="text-align: left;"><strong>How to create New Invoice?</strong></p>
<ul style="text-align: left;">
<li> For Invoice of customer you have to specify for which customer you need to create invoice.</li>
<li> You need to provide AccountId of customer for creating Invoice.</li>
<li> Create object of ISalesInvoice and initialize it with sbi.CreateSalesInvoice(false). ISalesInvoice invoice = sbi.CreateSalesInvoice(false);</li>
<li> Create object of IItemLine.</li>
</ul>
<p style="padding-left: 60px;">IItemLine line;</p>
<ul style="text-align: left;">
<li> Initialize the object of IItemLine with invoice.CreateSalesInvoiceLine(parameters) IItemLine line = invoice.CreateSalesInvoiceLine(DocumentLineType.ContractItemLineType) as IItemLine;</li>
<li> Now assign the value for LineItem property of IItemLine object line.LineItem = sbi.ItemAccounts.GetByPrimaryKey(ProdId) as IItemAccount;</li>
<li> Provide the Quantity and other details of IItemAccount object.</li>
<li> Finally save the details of Invoice</li>
</ul>
<p style="padding-left: 60px;">invoice.Save();</p>
]]></content:encoded>
			<wfw:commentRss>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/08/01/create-application-extension-for-microsoft-office-accounting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

