Saturday, November 1, 2008

How to use Microsoft CRM to Manage Client Projects


As a Microsoft partner, we help our clients implement the solutions they purchase. One challenge we have is how to track the project tasks so that we can:

1. Leverage the time-saving capabilities of Workflow within CRM.

2. Leverage the integration between CRM and Outlook so that project tasks appear in our users' Outlook Task lists and Calendars.

3. Keep the process simple while still providing enough control to keep the project on schedule and under budget.

Here is what we chose to do to manage our projects. Perhaps it will be suitable for you, as well.

1. Use Workflow Manager to create a new sales process for client fulfillment/project delivery.

While we could have chosen to create a new project entity, we wanted functionality similar to the Sales Process workflow available for Opportunities. Unfortunately, the only way we could do it (without a lot of custom coding) was to use the Opportunity entity. Sales Process workflow is not available for any other entity.

We created a new Sales Process called "CF - CRM", with a description of "Client Fulfillment - CRM Project Delivery." This naming convention separates the project processes from the true sales processes (they start with "LC" for Lead Conversion). This is a manual rule, meaning that we manually apply it to the opportunity.

The project management Sales Process has various stages (Initiate, Analyze, Diagnose, Develop, Deploy, Operate, Close) that are based on the Microsoft Dynamics Implementation Methodology. You can use whatever you want.

The beauty of this solution is that you can have as many processes as you want and apply the correct process depending on the project.

For example, we could have a project process for Point-of-Sale projects, another one for Great Plains projects, and a third one for CRM projects. Each process could be customized with its own stages and activities.

Within each stage, there are the appropriate activities and milestones. For example, within the Initiate stage, we have tasks for "Create project charter" and "Schedule project kick-off meeting."

If there are particularly critical or time-sensitive activities, then you might want to create activities to monitor the status of them and use workflow to escalate neglected or delayed activities to a manager.

You need to be careful about the level of detail and number of activities you create. Remember, this is NOT a fully functional project management application like Microsoft Project.

You can attach supporting documents or links to SharePoint documents to the activities if you need more detail.

2. Complete all stages and activities for existing sales process on opportunity.

You are now ready to start using the project management process you created in step 1.

If there is a true sales process assigned to the Opportunity, then be sure to close or cancel all activities so that the sales process is completed.

Keep the Opportunity open once the sale has been closed. We are going to continue to record activity against the opportunity.

3. Assign the appropriate sales process for client fulfillment/project delivery to the opportunity.

Now, manually apply the correct project management process to the Opportunity. The activities from the first stage will be created and assigned.

4. Complete project activities.

No go ahead and do the work. Activities can be assigned to individuals or queues. Tasks that are not on the project management Sales Process you defined in step 1 can be manually added to the opportunity.

As you complete each stage, the activities for the next stage will automatically be created.

5. Use the Sales Pipeline report or a custom report to keep track of projects.

Since we are using the built-in Sales Process functionality, you can easily run reports showing the progress of the projects. You will probably want to create your own custom reports using the standard Sales Pipeline report as a template.

6. Close the Opportunity upon completion of the project.

Once the project is completed and all activities in the project management Sales Process are completed, close the Opportunity.

Conclusion

As you have seen, Microsoft CRM can be used in creative ways to help you best manage YOUR business. Using it for simple project management is a great illustration of the "Affordable Adaptability" of Microsoft CRM. Using this illustration, think "outside the box" to come up with other ways to use Microsoft CRM to support your business. Be sure to let me know what you come up with!

Michael Cross is a Microsoft Certified CRM Professional with Small Business Systems LLC. Visit http://www.bturnkey.com/crm.html to learn how Microsoft Dynamics CRM 3.0 enables your people to work the way they want to work, while providing you wih the data you need to increase the number of customers, provide the quality of service your customers expect, and increase your revenues.

Labels: , , ,

Saturday, May 3, 2008

How CRM Software Helps in Account Management


The increase in competition in all business fields positioned customers at the top most point. Customer Relationship Management or CRM practices have thus became mandatory for all business enterprises today to satisfy their customers. Companies use standard and customized CRM software tools to enhance their customer relationship management activities. All these software programs are capable for automating each and every business processes from customer tracking to business undertakings, including account management practices.

Account management as the name implies is the storing, sharing and reviewing of all business accounts. Account management practices are so important to the business enterprises that they act as the chief resource for all customer and company related information. The introduction of CRM software solutions and sales force automation (SFA) practices made account management including data collection and data integration easy. These software programs eliminated traditional account management activities that need lot of paper works and manual labor.

The account management CRM software programs are capable of maintaining complete history of various accounts. They automatically track all small and large interaction of accounts such as customer contacts, money transformations, partnership programs, employee payment etc. Account management activities through CRM software solutions help the companies to store account and customer information in a centralized database connected to different data processing devices. These account management application software programs are capable of providing timely reviews and analytics about the financial health of an organization.

CRM account management software programs track each customer interacting with the company. These software programs store all customer information like customer name, customer visits, contact information, number of visits, visiting intervals, how much money spend on products/services etc in appropriate CRM databases. Timely these data are retrieved and integrated to find good customers. This CRM account management software feature helps organizations to design and develop suitable marketing and service plans for each customer. The built-in communication devices of the account management software help in marketing of products/services through direct marketing, e-mail and phone.

The standard features of modern account management systems include single database having links to all data resources of the organization, multiple modularity for receiving all data, capability to cope with any data format like work, excel sheet, images, graphs etc, adaptability to any operating system, web-linked communication devices for fast data tracking and recovery, the capacity to work both online and offline, and the capacity to carry out multiple functions like contact management, product management, lead routing , custom reporting , partner tracking and sales forecasting.

Customer relationship management software assisted account management guides employees to effectively provide appropriate services to their customers. Account management software enables the sales professionals to schedule and track activities related to accounts, tracing the delivery and to launch innovative business opportunities. The sales force automation and effective communication also help employees, especially sales representatives, to easily coordinate different activities. The company management can also monitor and regulate their employees more effectively. CRM software solutions also ensure flexibility of business in changing climates.

The other advantages of account management through CRM software include -time and working capital saving, elimination of manual data entry and paper works, timely warnings about inadequate data and deadlines, proper organization of data, easy data tracking and sharing, elimination of duplicate data entry and false data entry, helps in designing customer service plans, better trouble shooting and above all less mental pressure on company management and workers.

This article has been provided by eSalesTrack.com , a US based provider of on-demand CRM (Customer Relationship Management) and other application software such as Sales Force Automation. To learn more about CRM visit CRM Articles.

Labels: , , , , ,

Friday, April 11, 2008

Small business CRM: How to select the right CRM software for your company

You've decided that you need a better customer relationship management system ("CRM") for your small business. You need a good place to store and access your customer information just like bigger companies. You want to be able to generate meaningful reports and manage your marketing campaigns. But there are so many options in all price ranges.

So how do you choose the best CRM software for your company?

What is CRM, exactly?

In its simplest form, CRM is a database where sales and marketing teams store critical account data such as contact & account information, lead source, sales activity history, purchase history, and marketing campaign data and projections.

CRM can also be an important reporting tool. For example, you can use it to

  • Generate revenue projections for a product, a sales rep, and your company as a whole
  • Tie revenue to the original marketing campaign
  • Pull up lists of leads and activities by sales rep
  • View the number of leads you have at each step in your sales process
  • Track your progress against your goals
  • Manage marketing campaigns
  • Capture leads from your website
  • Minimize the time your team spends creating manual sales & activity reports

Choosing the right CRM

When you choose the right CRM software, you gain knowledge and power to keep your team on track and measure progress against goals.

  • Best case: Your CRM matches your marketing, sales, customer service and retention strategies. It's easy to use and provides reports that eliminate the need to generate tedious manual reports. It may integrate with other software like accounting and inventory, enabling your entire team to view important data and reports in real time.
  • Worst case: You don't have a solid system for managing customer information; it's kept in various files or databases that aren't linked. It's difficult and time-consuming to create revenue projections, sales reports and marketing campaign reports. The result: lost revenue, productivity and opportunity. Even worse: you use paper files.

How to compare CRM software

The key to selecting the right CRM is to analyze your needs.

  • Decide what information your team should be able to access and how they'll use it.
  • Identify who needs to use the system and where they're located (i.e. in different offices).
  • Determine what reports you'll want to generate, particularly your revenue and pipeline reports.
  • Identify the marketing programs you'd like to be able to run and how that information can help you better manage your accounts.

If you've outgrown your current system, you may be able to purchase add-ins to give your existing system more power. You may also decide to evaluate new systems to give you the true functionality you need.

Select a CRM vendor

Once you've defined your requirements, look for a CRM package that meets your needs. Remember that many systems come in several versions; you can start with a basic version and upgrade as you grow, but make sure the upgrade process is seamless.

Manage CRM implementation

When you're nearing the end of your selection process, get ready for implementation.

  • Create an implementation team.
  • Develop a schedule for key tasks: configuring fields, migrating data, creating reports, training users.
  • Create a solid training plan.
  • Launch the software.
  • Do followup training to ensure that your team uses the software as planned. Most implementations fail because employees don't use the software properly.
  • Gather feedback and modify the software configuration as needed; make it as intuitive and powerful as possible.

There are plenty of consultants who can help you through this process. But you can save a lot of time and money by educating yourself. We've created a free CRM selector tool to help you define your needs and narrow your vendor list -- just email us now and we'll send it to you.

James Sagar is one of the creators of the Marketing M.O., web-based software that delivers marketing strategy, guided best practices and interactive templates in 29 business marketing subjects. Entrepreneurs, executives and marketers use the M.O. to solve the challenges they face each day.

Labels: , , , , , , ,

Sunday, March 30, 2008

How To Select The Right CRM For Your Business?

Learning the ins and outs of any software package is never an easy task, trying to find the time to learn it all within the limits of a free trial, and then apply it to your specific business needs can prove to be a complete turn off!

For the uneducated CRM mind, choosing the right on demand Customer Relationship Management platform, ?on demand? meaning a fully hosted solution that you access over the Internet; can be a logistical nightmare.

From simple acronyms such as CRM, SFA (Sales Force Automation) and ERP (Enterprise Resource Planning) to the more complex terms such as Application Programming Interface and Workflow Automation, there is an overwhelming amount of information you need to know before you really begin to look at a product.

This article aims to address these issues and encourage you to take a more conceptual approach to learning and understanding CRM. Consider this; every site you visit will more often than not appear to be the answer to your prayers. However, knowing what to look for can quickly rule out the pretenders from the contenders.

? First off, ask yourself ?can I customize the product??, ?or can they customize the product for me?? Any company pushing a product that cannot be tailored to suit your needs is not worth your time. No matter what they say or preach, their solution cannot meet the needs of every individual company?s business needs.

? Secondly, look for a company and product that has multiple editions/platforms, such a company has worked with different industries already and tailored their product to meet specific industry needs, and is obviously willing to work with their customers.

? Third, look for a road map, investing in a company that offers no information on the direction of their product, and future version/feature releases does not show a willingness to meet your future business needs. You want a product that will grow along with you, not one that will hamstring you as you grow.

? Finally, look for a product that is applicable across your company, if you are paying full value for a CRM solution; make sure you can use the application across your enterprise. Having a fully hosted operating system backed by and Service Level Agreement will ensure that your entire organization is on the same page.

In conclusion acquiring the right CRM package is no easy task, however, researching the market based on the above criteria will ensure you acquire a CRM solution that will meet your specific needs today, and continue to meet your needs as you grow.

Colin Duffy enjoys writing about CRM subjects and on demand CRM software vendors such as Salesboom (http://www.salesboom.com )

Labels: , , , ,

Monday, February 25, 2008

CRM On Budget: How To Develop and Stick To a Realistic Budget for CRM

It seems that having a project come in On-Budget is the holy-grail of project management, especially when it comes to CRM projects. With their 70% failure rate, CRM projects represent a significant risk to a small business' financial health and warrants more "measure twice, cut once" consideration before beginning.

Coming in On-Budget does not mean you managed to squeeze your project into whatever arbitrary budget you came up with when you first started. It also doesn't mean that you started with an overly generous budget.

It does mean that you develop a budget that takes into account an analysis of 4 critical areas:

1. PAYOFF. You need to know exactly how your CRM system is going to generate ROI. This will help you focus your project on the right areas. By knowing how you expect payoff to be achieved, you can plan to achieve it.

2 RISK. You need to figure out where the risk is in your project because "risk=expense". By figuring out what can go wrong, you can take measures to minimize and contain that risk.

3. SERVICES. Be sure to fully account for the variety of services that will be required. A few often overlooked areas that can increase your services bill significantly incoude: meetings, testing time, debugging time and "while you're here..." time.

4. TECHNOLOGY. Choosing the wrong technology is can be a huge waste of money. From the worst case scenario of a totally failed project to having to spend extra money to make the wrong software do things it wasn't intended to do.

What makes putting together a realistic budget so difficult for small businesses is that it's not what they do and they don't have the experience of having done several before. It's not what they do. So, they rely on the Sellers of CRM who have their own vested interest in not scaring off their customers with numbers that are perceived to be too expensive.

By putting together a realistic budget, you may very well find that the project is going to cost much more than you were intitally prepared to spend. It's best to find this out now and before you "sign on any dotted lines".

If you do find out the project is going to cost more, here are a few ideas of what to do:

- WAIT & SAVE. Perhaps you need to wait 6 months until you have a bigger budget. Use this time to get prepared for the project: learn more about the software choices, make sure you're business processes are as fine tuned as they can be, and focus on how CRM software will generate ROI.

- GO AHEAD. It may be more money than you were expecting, but may still be within your budget. If you're clear on how the CRM system is going to generate ROI and you're otherwise ready, go for it!

- SCALE DOWN. If you have a very clear idea of how the CRM software is going to achieve ROI and you can't afford the full project, focus in a smaller area to begin with that will have a payback. Use this payback to help fund future projects. It's always a good idea to start with smaller, high-payoff projects first.

- FIND MORE ROI. If you have a really clear and compelling business case for how a CRM system is going to improve your bottom-line, it's much easier to find the necessary funds to implement it.

- DOUBLE CHECK. Make sure you're choosing the right technology. Cheap software can often be expensive to implement. Double check to make sure you're basing your budget on the right CRM software. You may find that a software that costs more in licensing, ends up being an overall more affordable solution.

Coming in On-Budget means you started with a realistic budget. The Insider's CRM Success System goes into great detail on how to develop a realistic budget and provides the control forms and worksheets you'll need.

Scott Gingrich, founder of The CRM Coach (www.thecrmcoach.com) is the creator of "The Insider's CRM Success System", the world's most complete and only CRM Success System guaranteed to save thousands, developed specially for small business.

Labels: , , ,

Sunday, February 3, 2008

Microsoft CRM Selection

Microsoft CRM is recent (2001) CRM answer from Microsoft and attempt top get market share from traditional vendors: Siebel, Oracle, Onyx. Now it is targeted to the whole spectrum of horizontal and vertical market clientele. It is tightly integrated with other Microsoft Business Solutions products such as Microsoft Great Plains, Solomon, Navision (the last two in progress).

We would like you to give you Microsoft CRM selection advise, based on our MS CRM consulting practice, going back to its inception in 1999. This article is written in FAQ style for beginner level

1. What is your industry how strange it may look close to 40% of our clients or so-called orphan clients who needs help with Microsoft CRM customization are freight forwarding, transportation companies, who needs either improvement in Exchange-CRM connector or MS CRM integration with their freight forwarding system, where they would like to see on the fly resent shipment info. And also to mention freight forwarding companies are usually large (more than 50 CRM users)

2. How comfortable you are with Microsoft technology in-house support The old-days idea of Apple computer was to make computer absolutely intuitive and working for housewife. Now we know that this is not realized so far. If you compare MS CRM with Siebel you will see that MS CRM requires y0u to have Microsoft Certified people in staff. Everyone knows that Microsoft is so innovative that each product requires daily service packs and patches

3. Do you have Great Plains, Solomon or Navision CRM is usually integrated with ERP system and if you are looking at MS CRM you should benefit if you have ERP from Microsoft Business Solutions (Great Plains, Solomon, Navision, Axapta or Small Business Manager - SBM)

4. Operating System Philosophy - Microsoft likes clients who have no UNIX/LINUX/IBM/Apple etc inclination and staked on Microsoft Windows 2003/2000/XP/Longhorn, preferably staying on Intel platform (No AMD Athlon 64)

Have fun in selection and decision. We are here to help you: 1-866-528-0577

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, Arizona, Colorado, California, Texas, New York, Georgia and Florida and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.

akarasev@albaspectrum.com

Labels: , , , , ,

Friday, February 1, 2008

IT Department Skills to Support Microsoft Great Plains and Microsoft CRM

Microsoft Great Plains as ERP and Microsoft CRM as Client Relation Management system is very robust combination and could serve midsize to large corporation as Business System. Being VP IT or IT Director you need to foresee the positions to have in your IT department to do internal MS Great Plains and MS CRM support.

Let us give you the directions, based on our research and consulting practice.

1. Microsoft SQL Server Specialist we specially do not name this position as MS SQL DBA, because both Great Plains and MS CRM are not very complex from the database administration side, they do not use indexes optimization, referential integrity, probably do not require complex transaction log backup/recovery scenarios. On the other hand this position requires Great Plains and Microsoft CRM tables structure analysis and some primary Great Plains data fixing skills via SQL queries, described in MBS Customer source techknowledge database. The best candidate should have some accounting background - to be able to address ongoing issues to MBS technical support.

2. Network Administrator with good Microsoft Exchange and Active Directory skills. Microsoft CRM uses all the newest Microsoft technologies, and Exchange is a workhorse here. In order to install and upgrade MS CRM this guy needs to understand the under-laying Microsoft technology. In the best case - she/he should know Exchange security structure and probably program Exchange handlers, due to the fact that CRM/Exchange connector is not a perfect tool yet.

3. C# or VB.Net programmer with excellent SQL Skills if you are midsize or large company - you should have this position - you will need web publishing and MS CRM customization and its support. Currently Microsoft CRM SDK has C# examples - so C# programmer would be the best fit, it may have more VB code in the future, so the C# - VB balance maybe restored.

4. Crystal Reports Designer/Programmer - Crystal Reports is the best tool available on the market to address both Great Plains and MS CRM reporting needs. This position maybe merged with one of the above.

These people should be probably cross-trained in both Great Plains, Microsoft CRM, Crystal Reports, SQL and C# programming, so you do not depend on the unique skills of one person. In our opinion, which is based on our long term consulting practice - these skills will allow you to keep the cost of IT support reasonably low and avoid paying high consulting price to your Microsoft Business Solutions Partner.

Happy hiring and training! But in any case you need to select Microsoft Business Solutions Partner/Var/Reseller to be your official representative. This is how MBS has its channel working - it assures that Microsoft Business Solutions products are properly implemented. If you want us to be your Microsoft Business Solutions Partner - give us a call 1-866-528-0577! help@albaspectrum.com

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies USA nationwide Great Plains, Microsoft CRM, Microsoft RMS customization company, based in Chicago, Arizona, California, Taxes, New York, Florida and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.


akarasev@albaspectrum.com

Labels: , ,

Monday, January 28, 2008

Microsoft CRM Integration with Microsoft Retail Management System (RMS) overview

Microsoft Client Relation Management system (Microsoft CRM) and Microsoft RMS are both Microsoft SQL Server based applications, however historically Microsoft was purchasing industry leading software applications, such as QuickSell which is now Microsoft RMS.  So, RMS design fundamentals were minted a long time before Microsoft CRM.  But, still integration between the two is straightforward and what you need is consultant, who is familiar with both systems structures and customization scenarios

Microsoft CRM is currently integrated with Microsoft Great Plains and will be integrated with Microsoft Navision in the close future, RMS integration is not planned to our knowledge, so you should seek third party solutions or create your own integration.  We see the need for such the integration when you sell on account in RMS and have customer support call center automated with Microsoft CRM.  Let us give you highlights:

  • Microsoft CRM custom lookup.  More likely you will nee lookup to your RMS headquarters or store records for the customer transactions from Account screen.  Microsoft CRM allows you to have custom navigation bar on Account screen by clicking on this bar you could call your custom web .Net application, which will call Microsoft RMS database and return you the grid of customer transactions
  • RMS architecture excurse.  Microsoft RMS has Headquarters and Store databases.  The exchange between the two types of databases uses worksheet mechanism.  Most of the transaction types are initiated on the store level and transferred to the Headquarters database (with some global data exception, global customers for example are handled on HQ level and then propagated down to the stores). 
  • Data Inquiry and Update.  The MS RMS architecture suggests you to query primarily Headquarters database and do not change data in HQ database.  If you need to change data on the store level from Microsoft CRM custom screen you should consider placing web service on the SQL Server hardware in the store to deal with the store-initiated transaction
  • Microsoft CRM programming.  Microsoft CRM has MS CRM SDK (Software Development Kit).  This is open source tool, you can download it from Microsoft site and it is description of Microsoft CRM classes and methods with sample codes in C# and VB.Net.  Microsoft technical support encourages you to use Microsoft CRM SDK objects and discourages you from direct SQL server programming.  If you need to query MS CRM database you should create your custom database and place your objects: SQL views and stored procedures there.  Do not place custom object into MS CRM databases
Do your homework in integration and if you have issues or concerns we are here to help! If you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com


Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies USA nationwide Great Plains, Microsoft CRM customization company, serving clients  in Chicago, California, Texas, Florida, New York, Georgia, Arizona, Minnesota, UK, Australia and having locations in multiple states and internationally ( http://www.albaspectrum.com ), he is CMA, Great Plains Certified Master, Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer. You can contact Andrew: andrewk@albaspectrum.com

Labels: ,

Tuesday, November 27, 2007

Microsoft CRM Customization programming email activity attachment

 Microsoft CRM is now on the scene and it is increasing its market share, due to Microsoft Business Solutions muscles and marketing strategy. It is tightly integrated with other Microsoft Business Solutions products such as Microsoft Great Plains, Solomon, Navision. Being relatively inexpensive in comparison to competitors, like Siebel, Oracle - Microsoft CRM opens you the door for worldwide operations automation. In this small article we would like to give you, software developer, some hints on Microsoft CRM customization.

Today's topic is Activity of email type programming - you usually deal with these customizations when you improve Microsoft Exchange CRM connector. How do you create email attachment - this is the main discussion topic. Well use C#.Net.

In Exchange handler/event sink you create Activity of email type in MS CRM and one of the tasks is transfer the attachment(s) from the body of the incoming email to the attachment(s) in the Activity. You can realize it through direct access to Microsoft CRM DB. Lets see C# code:

1. First we are getting access to the letter via ExOLEDB:


CDO.Message iMessage = new CDO.MessageClass();

CDO.IBodyPart iPrt;

iMessage.DataSource.Open(bstrURLItem, null, ADODB.ConnectModeEnum.adModeRead,

ADODB.RecordCreateOptionsEnum.adFailIfNotExists, ADODB.RecordOpenOptionsEnum.adOpenSource, "", "");


2. Next we come through the attachment list, get their names and save their bodies into temporary catalogue:


for(int i = 1; i ";

strXml += "Activity 1";

strXml += "" + attachmentNumber + "";

strXml += "" + emailId.ToString("B") + "";

strXml += "";

// Create the activity attachment

Guid attachmentId = new Guid(activityAttachment.Create(userAuth, strXml));

log.Debug("Create Attachemnt ID: " + attachmentId.ToString("B"));

UploadFileToDB(attachmentId, filename, filesize);

return attachmentId;

}

catch (System.Web.Services.Protocols.SoapException e) {

log.Debug("ErrorMessage: " + e.Message + " " + e.Detail.OuterXml + " Source: " + e.Source);

}

catch (Exception e) {

log.Debug(e.Message + "" + e.StackTrace);

}

return new Guid();

}


5. Main problem, however is attachment body adding to MS CRM database. Main requirement is attachment must be encoded as BASE64 stream and its length must be specified correctly together with Nine Type and file name of the file it will be knows as an attachment in activity. Lets look at the C# code:


public void UploadFileToDB(Guid attachmentId, string filename, long filesize) {

string contentType = "application/octet-stream";

try {

Hashtable mimes = LoadMimeDB(Environment.SystemDirectory + "/Albaspectrum/ContentType.txt");

if (mimes != null) {

string tmpContentType = GetMimeType(mimes, filename);

if (tmpContentType != null && !tmpContentType.Equals(""))

contentType = tmpContentType;

}

byte[] memoryData = new byte[filesize];

FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read);

BinaryReader reader = new BinaryReader(fs);

reader.Read(memoryData, 0, (int)filesize);

reader.Close();

fs.Close();

OleDbCommand command = conn.CreateCommand();

command.CommandText = "UPDATE ActivityMimeAttachment SET FileSize = (?), MimeType = (?), FileName = (?), Body = (?) WHERE ActivityMimeAttachmentId = (?)";

command.Prepare();

command.Parameters.Add(new OleDbParameter("FileSize", filesize));

command.Parameters.Add(new OleDbParameter("MimeType", contentType));

command.Parameters.Add(new OleDbParameter("FileName", new FileInfo(filename).Name));

command.Parameters.Add(new OleDbParameter("Body", Convert.ToBase64String(memoryData, 0, (int)filesize)));

command.Parameters.Add(new OleDbParameter("ActivityMimeAttachmentId", attachmentId));

log.Debug("Prepare to upload attachemnt " + attachmentId.ToString("B") + " in ActivityMimeAttachment");

command.ExecuteNonQuery();

memoryData = null;

}

catch (Exception e) {

log.Debug(e.Message + "" + e.StackTrace);

}

}


6. File ContectType.txt is matching list of the files extensions and their mime-type in the following format:


asc application/pgp-encrypted Armored Encrypted file (PGP)

asd application/astound Autosave file (Word for Windows)

asm PC ASM File

asn application/astound


etc.

Happy customizing, implementing and modifying! If you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

Boris Makushkin is Lead Software Developer in Alba Spectrum Technologies USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, Boston, San Francisco, San Diego, Los Angeles, Houston, Dallas, Atlanta, Miami, Montreal, Toronto, Vancouver, Moscow and Europe and internationally (www.albaspectrum.com), he is Microsoft CRM SDK, C#, VB.Net, SQL, Oracle, Unix developer.


borism@albaspectrum.com

Labels: , , , ,