Data Manager customization: extraTopRightButtonsForViewRecord

Data Manager customization: extraTopRightButtonsForViewRecord

The extraTopRightButtonsForViewRecord customization allows you to add to, or modify, the set of buttons that appears at the top right hand side of the view record screen. It is provided an actions array along with the objectName in the args struct and is not expected to return a value.

Modifying args.actions is required to make changes to the top right buttons.


See Reference: Data Manager top right buttons array for detailed documentation on the format of the action items.

For example:

// /application/handlers/admin/datamanager/blog.cfc

component {

	private void function extraTopRightButtonsForViewRecord( event, rc, prc, args={} ) {
		var objectName = args.objectName ?: "";
		var recordId   = prc.recordId    ?: "";

		args.actions = args.actions ?: [];

			  link      = event.buildAdminLink( objectName=objectName, operation="reports", recordId=recordId )
			, btnClass  = "btn-default"
			, iconClass = "fa-bar-chart"
			, globalKey = "r"
			, title     = translateResource( "" )
		} );