function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Few apex questions Part - 2

1. Example where Flow will help but NOT Workflow or Process Builder.
2. How to decide whether to make a method static or not ? (Other than calling method directly from Class Name).  Example would be nice.
3. Why workflow works when there's Master-Detail but NOT when there's LookUp ?
Heather ThompsonHeather Thompson
1. You want to make a query, delete a record, update an unrelated record, have complex logic that requires looping through your records, you need the user to input information onto a screen.
"Static methods, similarly, are methods that act globally and not in the context of a particular object of a class. Being global, static methods only have access to its provided inputs and other static (global) variables." (Example in the blog post)
3. Not sure what you mean by "workflow works" but in general the concept of Master-Detail is that the objects are implicitly tied together.
Hi Heather thank you for your responses.

3. I meant Workflow doesnt work on Cross Objects (Unless the relationship is Master Detail ), was curious to know why workflow cant be created on Cross object when the relationship is Lookup