Documentation > Services API > ServicesUtil

CrownPeak.CMSAPI.Services.ServicesUtil

General utility methods for the Services Library.

NameDescriptionType
CopyLabelConform

Conform cloned asset Label to popup field. Note: For use in copy.aspx. Sync a copied/cloned asset's content labelField with .Label text entered in "clone name" popup. Ignore if unchanged. Works best with post-input validation requiring this field and renaming asset to the content labelField on save.

Method
GetFilterDictionary

Accepts a folder and filterParams, uses aGetFilterList to return a dictionary of assets. Dictionary values will be {asset.Label, asset.BranchId} OR if useBranchId is false {asset.Label, asset.Id}

Method
NewLabelConform

Conform new Asset Label to popup field. Note: for use in new.aspx. Sync a given asset's content labelField with .Label text entered in "new" popup. Ignore if modelLabel was entered (prevents saving multiple assets with the "New Model Name" Label. Works best with post-input validation requiring this field and renaming asset to the content labelField on save.

Method
ReformatDate

Parses a date string into a DateTime object and changes the format to the default "MMMM d, yyyy" or to a custom format.

Method

Connect with Crownpeak