I Have a Parent Account object in this i have check box field "No Asset exist". when ever i am trying to check the checkbox it need to show error message if Assert records exist for this Account Object. if no assert are exist for Account no error message need to show . Assert is child of Account

Need achive by using trigger...plese help on this


On on check box check you can call function from controller using apex:actionFunction(A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request.). while calling controller function you can pass parent account id to controller using action:param. In controller method, we can fire query on child asset to check if any asset is available. In that function we can get set 'isAsses' variable which will render section of page to show error.

  • thanks for reply..i need to use only trigger.. i am check check box on account standard .. not vf page – hsfdc Aug 26 '15 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.