Attaching multiple related records using triger

Posted by Rollbase User on 27-Jul-2013 07:45

Hi, I have 3 objects: Levy Exemptions Requests Levy Exemptions LSP rep They are all related to each other: Levy Exemptions Request to Levy Exemption (R67439733) Levy Exemption to LSP Reps (R74265029) LSP reps to Levy Exemptions Request (R74255354) Once I create "Levy Exemptions Request" and attach to it multiple "LSP reps", I create "Levy Exemption" and attach it to "Levy Exemptions Request". Now I'm trying to attach using trigger to "Levy Exemption", "LSP reps" that are related to "Levy Exemptions Request". I try following formula created in trigger (After Update) "Attach Related Record" in Levy Exemption : if ({!R74265029#id} = 0) { return {!R67439733.R74255354#id}; } } And I try this formula: var x; {!#LOOP_BEGIN.R74255354} x = new Array(); x["R74265029"] = {!R67439733#id}; rbv_api.attach("!R74255354#id", "levy_exemption", {!R67439733#id}, "lsp_rep", {!R74265029#id}, x); {!#LOOP_END.R74255354} None of the formulas are worki

All Replies

Posted by Admin on 29-Jul-2013 13:12

Hello Roman,



could you please provide me with the relationship cardinality of each object? As you had mentioned:



They are all related to each other:

Levy Exemptions Request to Levy Exemption (R67439733)

Levy Exemption to LSP Reps (R74265029)

LSP reps to Levy Exemptions Request (R74255354)



I would appreciate if you could identify whether each of the three relationships, from left to right, are "one to many", "one to one", or "many to one". This specific information will improve my understanding of the issue and provide a more precise solution.



Please let me know if you'd like my assistance in obtaining the objects' cardinality.



Thanks,

Corey Prak

Posted by Admin on 30-Jul-2013 07:01

One Levy Exemption Request to Many LSP Reps

Many Levy Exemption Requests to One Levy Exemption

One Levy Exemption to Many LSP Reps

Posted by Admin on 05-Aug-2013 01:13

Corey,



Is information that I provide is sufficient or you need something else?

This thread is closed