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.";}