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

Trigger to copy details of contact fields from a specific contact to Account fields
Hi,
Need help on writing a trigger to copy details of contact fields from a specific contact to Account fields.
Logic:
If contact Member Suspended = No and SCM Member Type = CWL then,
Copy below field details from that contact to Account fields:
Contact Fields Account Fields Data Type
Member Suspended >>> Active Picklist
Member Since >>> Member Since Date Field
Date Last Renewed >>> Date Last Renewed Date Field
Expiry Date >>> Expiry Date Date Field
License Term >>> License Term Picklist
Please could someone help me?
Thanks,
Swapnil
Need help on writing a trigger to copy details of contact fields from a specific contact to Account fields.
Logic:
If contact Member Suspended = No and SCM Member Type = CWL then,
Copy below field details from that contact to Account fields:
Contact Fields Account Fields Data Type
Member Suspended >>> Active Picklist
Member Since >>> Member Since Date Field
Date Last Renewed >>> Date Last Renewed Date Field
Expiry Date >>> Expiry Date Date Field
License Term >>> License Term Picklist
Please could someone help me?
Thanks,
Swapnil
You can acieve this with workflow only, there is no need to write a trigger for this.
In evaluation criteria only you can specify specific contact and account details and condition, then you can have a cross object field update on account object.
Thanks for you comment and it would be nice to have it simple WF to make this all happen, but for me the question is how and what do I define in work flow to make it happen. May be if you can explain and guide a bit more wit some detail steps I may figure it out.
Thanks,
Swapnil
If you are not familiar with workflows then i would suggest you to refer few examples provided in following help Doc:
http://help.salesforce.com/HTViewHelpDoc?id=workflow_examples.htm&language=en_US
https://login.salesforce.com/workflow/tutorial/creatingworkflowrule.htm
You can have WF like:
Workflow on Accounts
Evaluate the rule when a record is: when records are created or edited
Rule Criteria (Filter): Contact name = ABC and Account name = XYZ
and
contact Member Suspended = No and SCM Member Type = CWL
Immediate Actions : Field update