class PropertiesService method .getDocumentProperties()

PropertiesService is the Apps Script service.

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

What it does

Returns key-value storage tied to the current spreadsheet or doc.

Why it's used

  • Store settings tied to this one spreadsheet file.
  • Track last sync time without a hidden settings tab.

Common errors

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

Explore

Related methods

Better Sheets tutorials

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