0

I have an instance of an Object, which has the variables

type = x, number_of_exams = 2, previous_no_of_exams = 0.

In the next instance of the object, of the same type = x, I want the previous_no_of_exams to be = to 2, number_of_exams = 0.

So when an instance of the same object is created, I want it to check any previous record of that object, type 'x' and get the number_of_exams value and assign it to the new object instance's previous_no_of_exams variable.

Can this be done without APEX or triggers?.

Maybe through workflows or process automation?

  • How you distinguish which object is "previous" ? – user1974566 Nov 30 '18 at 9:48
  • can we check, if the same type of object exist before hand, like a before trigger does. but without a trigger? – Niveth Kumar Nov 30 '18 at 10:00
  • 1
    You could have a look at Visual Flows, they allow querying of other objects. – Folkert Nov 30 '18 at 10:11
0

Have you tried storing these variables in a custom setting? I believe you can store those "counter" type variables and then update from process builder if you're trying to keep an active count of how many records have been created / updated.

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.