Skip to content

SaveRecord command

Include: Use Db\DBCommands.pkg

Purpose

Saves the current DD local buffer using command syntax.

Syntax

SaveRecord oDataDictionary
SaveRecord oFirstDD oSecondDD

How it works

  • SaveRecord oDD sends SaveRecord to oDD.
  • Multiple DD arguments recurse left to right.
  • SaveRecord creates a record when HasRecord(oDD) is false and updates the current record when HasRecord(oDD) is true.
  • SaveRecord is lower-level than Request_Save; when code needs the full DD save entry point that updates foreign keys from active parents first, call Send Request_Save of oDD instead of the command.

Example

Clear oCustomerDD
Move "Data Access" to oCustomerDD.Name
Move "Miami" to oCustomerDD.City
SaveRecord oCustomerDD

See also