Usig sdk to add a note to an existing account

Hi,
Anyone know how to add a note programatically to an existing Account?
Thanks
John

0
John
2/28/2007 4:14:26 PM
crm 35858 articles. 1 followers. Follow

2 Replies
467 Views

Similar Articles

[PageSpeed] 23

Hi John,

It really depends on your situation the most obvious way is to use the CRM 
web services and simply use the create method.

    Public Sub CreateAnnotation()
        Dim service As New CrmService()
        service.Credentials = System.Net.CredentialCache.DefaultCredentials
        Dim myNote As New annotation
        service.Create(myNote)
    End Sub

Of course you will need to specify all the required fields; the above alone 
would fail! including the associated object ID (the GUID of the account) and 
the object ID which for account it is 1. 

For a more detailed explanation on the create method you can refer to the 
SDK documentation:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9c178b68-3a06-4898-bc83-bd14b74308c5&DisplayLang=en

-- 
Best Regards
----------------

Dave Abraham
Blog: http://www.crmrocks.net


"John H" wrote:

> Hi,
> Anyone know how to add a note programatically to an existing Account?
> Thanks
> John
> 
> 
0
Utf
2/28/2007 9:19:00 PM
On Feb 28, 9:19 pm, Dave Abraham
<DaveAbra...@discussions.microsoft.com> wrote:
> Hi John,
>
> It really depends on your situation the most obvious way is to use the CRM
> web services and simply use the create method.
>
>     Public Sub CreateAnnotation()
>         Dim service As New CrmService()
>         service.Credentials = System.Net.CredentialCache.DefaultCredentials
>         Dim myNote As New annotation
>         service.Create(myNote)
>     End Sub
>
> Of course you will need to specify all the required fields; the above alone
> would fail! including the associated object ID (the GUID of the account) and
> the object ID which for account it is 1.
>
> For a more detailed explanation on the create method you can refer to the
> SDK documentation:
>
> http://www.microsoft.com/downloads/details.aspx?FamilyID=9c178b68-3a0...
>
> --
> Best Regards
> ----------------
>
> Dave Abraham
> Blog:http://www.crmrocks.net
>
>
>
> "John H" wrote:
> > Hi,
> > Anyone know how to add a note programatically to an existing Account?
> > Thanks
> > John- Hide quoted text -
>
> - Show quoted text -

Thanks very much , got it working with youre help, below is the code i
used


			CrmService jh = new CrmService();
			jh.Credentials = System.Net.CredentialCache.DefaultCredentials;

			Guid g = new Guid("906C47C5-41C7-DB11-B1E3-0003FF1E2DEE");

			//ColumnSet  cols = new ColumnSet();
			//cols.Attributes = new string[] {"name"};
			//account oAcc = (account)
jh.Retrieve(EntityName.account.ToString(),g,cols);


			annotation myNote = new annotation();

			Lookup lookup = new Lookup();
			lookup.Value = g;
			lookup.type = EntityName.account.ToString();

			myNote.isdocument = new CrmSdk.CrmBoolean();
			myNote.isdocument.Value = false;
			myNote.notetext  ="Test from jh";
			myNote.objectid = lookup;
			myNote.objecttypecode = new EntityNameReference();
			myNote.objecttypecode.Value = EntityName.account.ToString();

			myNote.annotationid = new Key( );
			myNote.annotationid.Value = System.Guid.NewGuid();

			try
			{

				jh.Create(myNote);
			}
			catch ( Exception e)
			{
				Console.WriteLine(e.StackTrace);
			}

0
John
3/1/2007 9:52:54 AM
Reply:

Similar Artilces:

how do i add excel templates to spreadsheet solution
I want to add excel templates that I have downloaded - from Microsoft - to the spreedsheet solutions box. When I create a new spreedsheet I want these to show up when I select 'On my computer' when I look for a template. I have addded then to the same directory that Microsoft uses for the default templates but they don't show up when I am in Excel. Thanks If the Spreadsheet Solutions templates are actually installed they would be found in a folder with that name under something like: C:\Documents and Settings\<User Name>\Application Data\Microsoft\Templates If you ...

Can't add new record when not logged in to Windows XP as an Admin
I am new to Access and have never made an application in my life so bear with me. Here's my issue: I have a very small Access 2003 database with the backend residing in a folder on a server and the front end on each user's desktop. The intended users of my application have been given enough privileges to enter and read data in that folder (I've even tried giving them Full Control). When I log into Windows on the network, as an administrator, my .mde application works perfectly-my form pops right up when I start the app and I can add and view data as intended. However, when ...

IE8 Search Bar add-ons
I have two laptops. Both had IE8 installed at the exact same time. Tried to add search engines to the search bar on both. One took all I wanted fine, the other won't add anything other than Google and Bing. Any ideas? Both systems running XP Home. Both are Toshiba Laptops. Both have the same proc/same ram/etc... BKI Many third-party toolbars (including Google & MSN/Bing) have their own, very firm idea of where they should be located in the IE toolbar. All too often these toolbars don't "play nicely" with each other. Best bet is to uninstall all third-p...

Two accounts same bank
My wife and I have an account at the same bank. How do we setup money to allow for this. It appears that we have to create two logins and set up on person as one user and one as the other. We want all the inforamtion to be viewed in one budget and we have some joint accounts. How does money work with this. I have looked at all the docs and it appears that this is not possible. Thanks, In microsoft.public.money, NW wrote: >My wife and I have an account at the same bank. How do we setup money to >allow for this. It appears that we have to create two logins and set up on &...

Customer accounts
1. Is there a way to inactivate a customer account without deleting it? Has anyone found a way? We are trying setting the account credit limit to "0" and checking "enforce credit limits on this account" for starters. If I must delete it, will it affect the transaction history in the register? Is there a report I can print out to save the information for future reference? 2. Is there a way I can make the "active box" go directly to a specific tender line on the tender screen if a customer account has been opened? For example, an employee account is on the scr...

Best PartyPoker offer available! For new real-money accounts only!
Get started at PartyPoker now and get a very special startup offer that is available only to new signups and for a very limited time only. Just go to the PartyPoker.com website: http://www.partypoker.com/index.htm?wm=2569156 download the software and open an account using the bonus code: AAABONUS25 and make a deposit of $50 to $500 and you will recieve an immediate $25, plus another 20% of your deposit after you play 125 raked hands. This is a very special offer that is available only to new signups and will not be available for long, so you are advised to take advantage of it now. Altern...

Notes in Outlook 2003- size problems
I don't know what the heck I did. but I used to initiate a note and I would get a little "sticky note" sized window for my use. Now, I get a big yellow "note" that filles the entire screen. Nothing I have tried fixes it so that I get the little note form Any Ideas? right-click with your mouse over the header and select "restore". I had the same problem that you decsribe and it worked for me. "jlrskymaster" wrote: > I don't know what the heck I did. but I used to initiate a note and I > would get a little "sticky note" siz...

add vertical line to floating bar chart
my chart has floating horizontal bars they are price ranges that all have the same center point i'm trying to draw a vertical line, starting from the x axis, going up thru all the floating bars i can set up a series on sheet with with the center point based on sheet data, no problem there the examples from google and the peltiertech samples all seem to add the vert line as part of a scatter chart, either i'm missing something simple, or maybe this not possible, ie, the chart has to a line/scatter chart to begin with?? Hi bbxrider, You should be able to add a new data series and the...

2004 changed newsgroup account...
I don't know if this is just specific to me or not, but after I installed Office 2004, Entourage changed the default email account I use for sending messages to these news groups. It started using my default account. I had another one set up in Entourage X that mangled my "from" header to protect from harvesters. That explains the dozen or so emails I have received claiming to be from Microsoft Support, that includes a handy little EXE file, and instructions on how to run it in order to patch my security. Haha! Yeah right. It looks very official however, and I suppose there are...

Create This Rule On All Accounts Grayed Out
I have two Microsoft Exchange 5.5 mailboxes open in Microsoft Outlook 2002. I am trying to create a rule that will run on both Exchange mailboxes but the "Create This Rule On All Accounts" check box is grayed out and cannot be selected. How do I enable this check box? Thanks, Mark rules only apply to the default exchange account, not secondary ones. You'd need to log into the mailbox and create server side rules for them to work on the second mailbox. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (V...

user account control
i know that does not mean there isn't a pwd, just that there might not be. is there a good way to check? thanks Hello nlehrer, I can not really follow you. What are you trying to ask? UAC has nothing to do with passwords. Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights. ** Please do NOT email, only reply to Newsgroups ** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm > i know that does not mean there isn't a pwd, just that there might > not > be. is the...

I want how to add bitmaps to header controls in our own grid control
Hai, I want some problem we are developing one customized grid control. i need to draw a bitmaps to column header of a grid control. But in this one we are creating one GridBasecell class, this class handles the information about grid control, but this is derived from CObject class. how to draw bitmaps in that header controls in MFC using VC++. Thanks & Regards, Bye. This is too specific to your own control and the fact that the class is derived from CObject does not matter. Normally you will do custom painting in OnPaint. --------- Ajay Kalra ajaykalra@yahoo.com Hai, ...

Local service account
Hi! There is a account called LocalService that can be used to run windows service. I have Windows XP and wonder where can I find this accound on my computer. I just wonder how is defined. //Tony Tony Johansson wrote: > Hi! > > There is a account called LocalService that can be used to run windows > service. > I have Windows XP and wonder where can I find this accound on my computer. > I just wonder how is defined. > > Your friends are Bing and Google. http://msdn.microsoft.com/en-us/library/ms684188(VS.85).aspx ...

Account information downloading into wrong account.
Hi gang, a month or so ago, I downloaded banking information (transactional details) from my line of credit into my chequing account, and for the life of me I can't figure out how to re-direct it now. Any assistance would be appreciated. ...

Entering non-existing items
Hi there, In a GP10.0 SP3, SOP transactions are allowing entering items no already created in Inventory/cards. In other words the system is not verifying whether do items exist or not in inventory at entry time in SOP docs. How to make the system only allows previously created items ? Thank you guys -- Gilberto Villegas GP Business Solutions partner I believe this depends on your setup. you will want to try going to Microsoft Dynamics GP menu >> Tools >> Setup >> Sales >> Sales Order Processing >> Options button and then unmark the &quo...

Account Register
I accidentally deleted a transaction I need. How do I undo it? Thanks. In microsoft.public.money, Ann wrote: >I accidentally deleted a transaction I need. How do I undo it? Thanks. Make an extra copy of your file in case you want to undo the restore. Then File->Restore an appropriate backup file. ...

Mutiple Personal Folders in Outlook
Hi all, I recently noticed that rather than just one Personal Folder in my Outlook mail folder view, there are three. Now, I have set up three separate POP3 accounts and pst files on this one workstation; however, other than the main one, each of the others opens and only shows that one. When I right-click the second or third in the list, and select Close, I get the message: Operation Failed, object could not be found. How can I get this set back to just one folder? Thanks! Larry Create a new mail profile and configure it to use your default .pst file, not one of the ghosts. --�...

Accounts Payable Credit memos
Does anyone know of a neat way to handle credits that are received from a vendor when the original invoice is already paid?? Using the auto-apply feature when printing out the checks has created MAJOR headaches. We get a ton of invoices for food since we prepare school lunches for several different schools. When using the auto apply the vendors do not understand why we are not paying the full amount since GP doesn't show the credit memo as a separate line item. Any ideas would be greatly appreciated. Hi Dawn, we have a solution called National Accounts for Payables Manager tha...

send email to new contacts/accounts
I want to set a rule to send a welcome email whenever account is opened. recipient would be the email address in Account.emailaddress1. how can this be done. workflow manager giving me only [owner] and [owner's manager] options.. is there a way to add something like [Account.emailaddress1]...? Hi, You should find a lot of hints when searching for the word 'slug' in the newsgroup. Furthermore you can take a look at this posting: http://icu-mscrm.blogspot.com/2005/04/sending-e-mail-from-workflow-with.html Hope this helps, Ronald Lemmen Avanade Netherlands "Shawki" w...

Can't retain password on one account in Outlook 2002
Hello, I tried all of the procedures that I found online deleting keys in the registry but nothing is working. This is really annoying. Does anyone know the real solution? ...

Add wiorksheet name to a formula on the same worksheet
Can somebody tell me how to include the name of a worksheet in a formula on that same page? For example, if I change "Sheet 1" to "Phillip", can I get cell A1...or any cell to display "This is Phillip's worksheet"? I know it can be done in Quattro Pro as I am converting a large Quattro Pro file at present. TIA Phillip On Thu, 24 Jul 2003 10:39:41 +1000, "Phillip Topping" <ptopping@tpg.com.au> wrote: >Can somebody tell me how to include the name of a worksheet in a formula on >that same page? > >For example, if I change "...

I need a small / Light Accounting Software
After so many months of waiting i finally install the Accounting Professional 2007 and its like soooooooo heavy and decided not to use it as it kills my pc I just need a software as simple as quickbook but with the following : 1. International Curreny Suppport i.e. I live in the middle east so i need something with Three Decimals 2. Emailing Invoices to customer straight from QuickBook and ofcourse the basic features of any small accounting software like showing the pending payments to vendors and payments to be received from customers Thats all i wnat please someone suggest me some...

Add target to trend chart
I've created a chart trending our company's daily rank over time. We have a specific rank as a target goal, and I'd like that to appear as a flat line on the chart, so we know how far we have to go. How can I get such a line, without having to populate a new column with the same number? Thanks Two options, 1) Simply draw a line where your target is at using the drawing toolbar. 2) Add an additional series to your chart containing two points. The X value of the points indicates the length of your line. The Y values should be set to your target. "Patience" <...

implementing auto-cc to certain mail accounts?
Hi all, I wonder if there's any way to enforce certain users to automatically cc their mails to designated email addresses? My company wants control over information flow both in and out of the company mail server. Is there any way to achieve this through server-side settings? -- Yours Sincerely, Y.H. Lee ...

Adding New Accounts in V3.0
We have recently installed V3.0 and imported contact and account details from V1.2 but when adding a new account either through Outlook client or web interface when saving we get 'error, an error has occurred please contact the system admin' We are using win2k AS with sql 2000, both sp4. Adding contact seems ok, I have checked permissions which are as out of the box. I have not customized the accounts or contacts forms. I have to add that the pain of moving from 1.2 to 3.0 seems worthwhile apart from this annoying error despite having to ditch all our customizations and pretty...