increase attribute value by one from entity collection records
-
mercredi 13 juin 2012 12:08
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
Toutes les réponses
-
mercredi 13 juin 2012 13:23
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
- Proposé comme réponse Amreek Singh mercredi 13 juin 2012 13:23
- Marqué comme réponse Wajed Ali vendredi 15 juin 2012 14:17
-
vendredi 15 juin 2012 14:17Thanks Amreek for ur help