You need to sign in to do that
Don't have an account?
V1nit
Alternative to Roll-up summary field
Hi,
On my accounts object, I have a picklist field called Type with two values(Type1, Type2).
i have accounts with Type1 and accounts with Type2.
There is a lookup field called parent account.
Now, from the lookuop field I can select a Type2 account.
So, each Type1 account will have a Type 2 account associated to it.
I will need to count the number of accounts with Type1 under each Type2 account.
Any idea how I can do this ?
Note that we are dealing with just one object Account. So, I cannot use roll-up summary fields
thanks,
Vineeth.
Hi,
Trigger is the only solution to do that, you need to create trigger on Type1 object.
Any ideas on how to implement the trigger ?
I have no idea how to write a trigger.
Hi,
The basic syntax to write a trigger is as follows :
trigger Mytrigger on Account (before insert,before update)
{
// body of trigger
// here you can write any apex script
}
Plz go through the following PDF to know mare about triggers -
http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf