You need to sign in to do that
Don't have an account?

About Aggrigate result assign to another field
hai friends,
I have invoicenumber field in Opportunity object, i want to query the max invoicenumber in that object and is assigned to another field.
How we can achieve this,Please help me in this scenario.
We can get Max value by group by a particular field.
like Select Name,Max(invoicenumber__c) from opportunity group by AccountName;
NOw i have max invoice number for a particular account.
how i can assign this to another field.
Thanks in Advance
SHARK
Here is the way from which you can get the value from aggregate result :
Thanks
Ankit Arora
Blog | Facebook | Blog Page
All Answers
Here is the way from which you can get the value from aggregate result :
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Thank u Ankit
Shark
Ankit, i have another doubt,
How we can assign to a.get(invoice) to another integer.
Can you please helpme, i am getting error ,when i was trying to assign that maxvalue to another integer like,
Integer maxvalue =a.get(invoice);
please help me,
Thanks in Advance
Shark
Sorry for bit late reply, try this :
Thanks
Ankit Arora
Blog | Facebook | Blog Page