Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 137182

Forum Post: silverlight to retrieve Account Id in CRM 2011

$
0
0

I am using silverlight to create a button that would update a field in CRM 2011

How would I retrieve accountid from [AccountBase] table and then update field in the [AccountBase] table.,

when the user clicks on the account record, is there away to get it's current accountid?

my current code works but I am hard-coding the account id, how do I retrieve the current account id? thank you

privatevoid btnUpdateAccount_Click(object sender,RoutedEventArgs e){Guid _accountid =newGuid("64693B0D-463B-E211-ABBA-000C290C2C64");Account _account =newAccount();          _account.AccountNumber="121276541";          _account.AccountId= _accountid;          _context.AttachTo("AccountSet", _account);          _context.UpdateObject(_account);          _context.BeginSaveChanges(UpdateAccount, _account);}privatevoidUpdateAccount(IAsyncResult result){          _context.EndSaveChanges(result);Account _account = result.AsyncStateasAccount;          textBoxUpdate.Text="update end.";}

Viewing all articles
Browse latest Browse all 137182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>