Tip #1460: Loops and ThisRecord in low-code plug-ins


When using the `ForAll` function in a low-code plug-in, the meaning of `ThisRecord` changes when used inside a loop. To disambiguate, use the `As` operator. The article provides an example of a low-code plug-in that creates a related task when a contact is created. The author initially encountered an error when using `ThisRecord` inside a loop, but resolved it by using the `As` operator. The article also mentions the drawbacks of writing code in a repetitive manner and highlights the benefits of using the `ForAll` function. The `As` operator brings `ThisRecord` back to representing the Dataverse row.


Article 11m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time