Click or drag to resize
TranslationHelperGetIDWithFallback Method
Returns the object ID for specified record calling GetID(TranslationParameters). If record could not be found, method falls back to GetIDFromDB(GetIDParameters, String) and eventually registers DB object in the helper. If neither attempt results into valid object ID, 0 is returned.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 13.0.131
Syntax
C#
public int GetIDWithFallback(
	TranslationParameters parameters,
	int siteId
)

Parameters

parameters
Type: CMS.DataEngineTranslationParameters
translation parameters. Property SiteName is not used and doesn't need to be set.
siteId
Type: SystemInt32
Id of site

Return Value

Type: Int32
Remarks
Object's Guid has priority over code name. However, if there is Empty provided as Guid, only CodeName will be used to identify object.

The TranslationTable property contains data records that correspond with the database. For translation records identified using partially correct parameters (either the code name or GUID is different than the value in the database), the actual values are loaded from the database for all fields. An index key referencing the correct data is then created from the partial parameters. The index key is used to obtain the record in future calls.

See Also