I am attempting to set a salesforce page up with a contact and application object. I was wondering if there was a way I could use the relationship between the two objects to have the contact account lock when I submit an application for approval.

  • refer my blog: santanuboral.blogspot.com/2017/01/… – Santanu Boral Jul 20 '17 at 14:29
  • They are not asking about what your blog post is speaking about and I do not believe it will help in the OP's situation. But you got a click from me :) – Eric Jul 20 '17 at 14:55

Not directly but there are several ways.

One would be to ensure that an update on a child record causes an update on the parent. If the parent is locked the update on the child fails

  • If you have a MD relationship you can add a rollup summary field

  • If a lookup, would could use a trigger or Process builder to force an update on the parent.

Another option, you could write a trigger that would check if the parent is locked and prevent the update without the above voodoo. Or you can write a trigger on the parent that when locked it sets a checkbox on all children that a VR rule would check.

Basically, there are many ways to do it, all of which are hacks / workarounds / etc and will not be the most ideal.

Best bet it to analyze the requirement and ensure it is really needed then decide on the best approach

Maybe someone will have some other grate ideas.

  • I'll give the roll up field a go – Matt Jul 20 '17 at 15:03

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.