Daisy chain condition setting from Row Action

  • 1
  • Question
  • Updated 4 years ago
I know I"m missing something here because this should be doable and magical.

I'm trying to allow users to click on a row action for "Initiatives" and update another "ActionsChosen" model.  They're linked together with a custom junction object "InitiativeActions"



Here are my steps:
  1. Activate and set model condition (initActionChosen> Initiative__r.Id = {{Id}}
  2. Query model (initActionChosen - completely rewrite data
  3. Activate model condition on ActionsChosen:
  4. Id in the set of values containing Action__c from initActionChosen model
  5. Query ActionsChosen model - completely rewrite data
I tried to build a wizard to display the information step by step and it looks like I don't make it very far.  I can get the Id to show up in a template but when I try to set the value on Step 1 above with that Id, I get a blank table returned.

What am I missing?  Whoever can help me get this working will be a rockstar.

Thanks

Initiatives with linked actions:


Linking Initiatives with Actions


Schema:
Photo of Joe Ort

Joe Ort

  • 2,256 Points 2k badge 2x thumb

Posted 4 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
The issue is in that you can't set a value in an object that you haven't yet queried. ie.  Initiative__r.Id = {{Id}}

This should be Initiative__c = {{Id}}
(Edited)
Photo of Joe Ort

Joe Ort

  • 2,256 Points 2k badge 2x thumb
Tried that before (and again)... no dice.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
Long explanatory posts drive me nuts. Can you record a video? There's a free Chrome extension for this that uploads to youtube.com called Techsmith Snagit. 

https://chrome.google.com/webstore/detail/techsmith-snagit/fcnghgbgmemnlbckdipnmelbanpgneik?utm_source=chrome-app-launcher-info-dialog
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
Better yet would be to do a screenshare.
Photo of Joe Ort

Joe Ort

  • 2,256 Points 2k badge 2x thumb
Answer:
Subquery the junction object instead of trying to filter the junction and use that filtered model to use a field on it to filter another table.

Pat's the man, the magician and a rockstar.

Thanks
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
One more thing. Set up another webex.