Referring to Deck's Context in a Table inside the Deck?

  • 1
  • Question
  • Updated 3 weeks ago
  • (Edited)
I have a Deck showing various Opportunities.

I have under this deck a Table that uses the Opportunity ID of the current deck context row to show Activities related to that Opportunity (WhatID on Activity).

I want to be able to create a new Activity and use the OpportunityID (current deck context) as the WhatID when creating the new Activity. Is this possible? I don't see how to go about finding the current deck card's fields (the Id field specifically) to refer to when creating a new Activity row.

Thanks!
Photo of Mark L

Mark L

  • 928 Points 500 badge 2x thumb

Posted 3 weeks ago

  • 1
Photo of Matt Davis

Matt Davis, Employee

  • 1,638 Points 1k badge 2x thumb
What you can do is add a Button Set within the deck, and have the model for the button set be OpportunityModel. For context on the Button Set, have Id=Id. Then any merge syntax you use within that Button Set will have the OpportunityModel row for the deck as context. If you add a show message & block UI action in the Button Set with {{Name}} it should show the Opportunity Name.
Photo of Mark L

Mark L

  • 928 Points 500 badge 2x thumb
Thank you.

I set up the button set with OpportunityModel and context as you suggested. When creating the new row in the Activity model from the button I specified the WhatId = Formula({{Id}}), grabbing the Id in context of the Opportunity in the current deck card and it worked.
(Edited)