• Priti Gohil 7
  • NEWBIE
  • 50 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies
Account and Contact One Custom fiedl - "Status"
one Account having multiple contact - if all contact Status fiedl is Active then only update "Active" in Account page. Even if 1 contact inactive then Account also inactive - 
I have written trigger. but it working fine only with 1 record. I mean when user insert new contatc at that whatever status I have given based on that it update on contact. but how to check for All contact ? 
A developer creates a Workflow Rule declaratively that updates a field on an object. An Apex update trigger exists for that object.
What happens when a user updates a record?  

A. No changes are made to the data.
B. Both the Apex Trigger and Workflow Rule are fired only once.
C. The Workflow Rule is fired more than once.
D. The Apex Trigger is fired more than once

Ex - There is one button(action) we have created.

when user clicked that button from LE so it should open view in Lightning ,
when user clicked from classic it should open in classic view
when user clicked from salesforce1 it should be open in respective view.
based on which things we can come to know. can any one gives me sample code ?


 

Account and Contact One Custom fiedl - "Status"
one Account having multiple contact - if all contact Status fiedl is Active then only update "Active" in Account page. Even if 1 contact inactive then Account also inactive - 
I have written trigger. but it working fine only with 1 record. I mean when user insert new contatc at that whatever status I have given based on that it update on contact. but how to check for All contact ?