Workflow But workflows will be only helpful to update the same object or master object in custom master-detail relationships. You cannot create records they currently can only result in a task, email, field update, or outbound message they can only cross objects in a master-detail relationship, from the detail to the master, and only for certain scenarios (all custom to custom objects, some custom to standard objects, and even fewer standard to standard)
Trigger can work across objects and where in you can query the object as well as you can do DMLs can do these things, but obviously using code often needed for roll-up type scenarios where roll up summary fields cannot be used often needed when a record needs to be created on a different object
Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
Trigger can work across objects and where in you can query the object as well as you can do DMLs
But workflows will only helpful to update the same object or master object in custom master-detail relationships.
There are several scenarios in which you can't achieve your functionality with workflows......
(1) Workflow : inbuilt functionality, used on single obj /master-detail
(2) Trigger : Used for complex business process in which multiple Obj can handle.
Before jump into coding check first is it possible to solve an issue using workflow.
Whenever we do DML operations like (insert,update,delete ) then you go for Trigger concept ,but here we cann't do DML operation using Workflow. .Trigger works before and after some actions,Coding is required. Workflows work only after some actions, Coding is not required.
Please let us know if you require more information.
Kindly mark my solution as the best answer if it helps you.
they currently can only result in a task, email, field update, or outbound message
they can only cross objects in a master detail relationship, from the detail to the master, and only for certain scenarios (all custom to custom objects, some custom to standard objects, and even fewer standard to standard) https://help.salesforce.com/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm&language=en_US
Trigger
can do these things, but obviously using code
often needed for roll-up type scenarios where roll up summary fields cannot be used
often needed when a record needs to be created on a different object
Workflow
But workflows will be only helpful to update the same object or master object in custom master-detail relationships.
You cannot create records
they currently can only result in a task, email, field update, or outbound message
they can only cross objects in a master-detail relationship, from the detail to the master, and only for certain scenarios (all custom to custom objects, some custom to standard objects, and even fewer standard to standard)
https://help.salesforce.com/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm&language=en_US
Example
I suggest you refer this link for example.
http://www.adminhero.com/creating-your-first-workflow-rule/
Trigger
Trigger can work across objects and where in you can query the object as well as you can do DMLs
can do these things, but obviously using code
often needed for roll-up type scenarios where roll up summary fields cannot be used
often needed when a record needs to be created on a different object
Example
I suggest you refer this link for example.
http://www.bedrockdata.com/blog/salesforce.com-sample-trigger-code-how-to-auto-create-an-account-or-any-record-when-adding-a-contact
http://www.salesforcetutorial.com/apex-trigger-create-simple-trigger/
Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
Thanks and Regards
Sandhya
Hi Naresh,
Trigger can work across objects and where in you can query the object as well as you can do DMLs
But workflows will only helpful to update the same object or master object in custom master-detail relationships.
There are several scenarios in which you can't achieve your functionality with workflows......
(1) Workflow : inbuilt functionality, used on single obj /master-detail
(2) Trigger : Used for complex business process in which multiple Obj can handle.
Before jump into coding check first is it possible to solve an issue using workflow.
Whenever we do DML operations like (insert,update,delete ) then you go for Trigger concept ,but here we cann't do DML operation using Workflow. .Trigger works before and after some actions,Coding is required. Workflows work only after some actions, Coding is not required.
Please let us know if you require more information.
Kindly mark my solution as the best answer if it helps you.
Best Regards,
Nagendra.P
There are to many post are available for same in google.
Please check below post i hope that will help you
1) https://www.youtube.com/watch?v=hvNQZtld7kk
2) https://success.salesforce.com/answers?id=90630000000gnMfAAI
3) https://developer.salesforce.com/forums/?id=906F0000000AvHRIA0
Workflow
- you cannot create records
- they currently can only result in a task, email, field update, or outbound message
- they can only cross objects in a master detail relationship, from the detail to the master, and only for certain scenarios (all custom to custom objects, some custom to standard objects, and even fewer standard to standard) https://help.salesforce.com/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm&language=en_US
TriggerLet us know if this will help you
Thanks for explanation but which apex code should be kicked off?
________________________________________
http://writingatermpaper.com/term-paper-topics/