class CardService method .newAction()

CardService is the Apps Script service.

.newAction() is the method name you will see after a dot in your code.

What it does

Defines what happens when a card button is clicked.

Why it's used

  • Wire a button to a server function when clicked.
  • Handle mark done or create row from the add-on.

Common errors

  • Forgetting parentheses on newAction. Write CardService.newAction(), not CardService.newAction or newAction by itself.
  • Skipping dots between chained calls. Each step needs a dot, like CardService.newAction().
  • Adding spaces where they do not belong. Write CardService.newAction(), not CardService .newAction(), CardService.newAction (), or CardService . newAction().
  • Wrong capitalization. Use CardService and newAction, not cardservice or newaction.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.