increase attribute value by one from entity collection records
-
Wednesday, June 13, 2012 12:08 PM
hello there ,
my problem is i retrieve my Custom Field Value using EntityCollection Class but now i want to increase that value by one,
Suppose in my field i am getting value "10", so i want to increase this value by One so i will be "11"
My Code:-
-------------------------------------------------------------------------------------------------------------------------------
in "autonum" i am getting value but i want to increase it By 1...So please help me
Thanks in Advance
All Replies
-
Wednesday, June 13, 2012 1:23 PM
try the following lines to the code after autonum=...line
int newnumber=int.Parse(autonum) + 1;
acct["new_autonumber"] =newnumber;
service.Update(acct);
I did not test it but it should work.
I hope this helps.
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com
- Proposed As Answer by Amreek Singh Wednesday, June 13, 2012 1:23 PM
- Marked As Answer by Wajed Ali Friday, June 15, 2012 2:17 PM
-
Friday, June 15, 2012 2:17 PMThanks Amreek for ur help