The Document Location Template entity defines how Document Locations will be retrieved or created for use with a SharePoint Content record whose Document Locations value is Custom.

Fields

Field Field Requirement Description
Name Business Required The primary name for this Document Location Template record.
SharePoint Content Business Required The SharePoint Content record associated with this Document Location Template.
Parent Document Location Business Required The Document Location under which this Document Location Template's Document Locations will be located.
Display Name Template Business Required

A template for the Name field of a Document Location created using this Document Location Template.

See Template Syntax below.

Relative URL Template Business Required

A template for the Relative URL field of a Document Location created using this Document Location Template. This template supports subfolder definition; for example, the url template {display_name}_{id}/Documents will reference a document location like "John Doe_ECC56DAFE1F44610A944FC3D896EAEA7" with a subfolder called "Documents". When displaying locations, the portal will display this template starting from "John Doe_ECC56DAFE1F44610A944FC3D896EAEA7/Documents", and users will not be able to directly access the root folder.

See Template Syntax below.

Display Order None Defines the order in which Document Location Templates will be displayed by SharePoint Content. Templates will be displayed in ascending order (lowest to highest).

 

Template Syntax

The Display Name Template and Relative URL Template fields allow for substitution of field values from an entity record. All fields, including special identifiers, follow the syntax {fieldname[:format]}, where fieldname is the name of the field used in substitution, format is the optional format specifier for that field. For example, to use a date value (such as modifiedon) in a template in yy/MM/dd format, you can use the syntax {createdon:yy/MM/dd}

The following substitution syntax is supported in template fields:

Substitution Variable Description Notes
{id[:format]} Substitutes the unique id for the selected record.

Supports .NET Guid string formats.

This field is rendered uppercase by default. The render as lowercase, use the downcase string function.

{logicalname[:format]} Substitutes the entity logical name of the selected record. e.g. "contact", "account", "incident"
{displayname[:format]} Substitutes the primary display name of the selected record. e.g. For a "contact" record, would substitute the value of the "fullname" field.
{default[:format]} Substitutes the default location relative url for the selected record.

This field is an alias for {displayname:truncate(101)}_{id}.

In other words, it renders up to 101 characters of the primary display name, followed by an underscore (one character), followed by the id for the selected record (26 characters), resulting in a string with a maximum of 128 characters.

{attribute logical name[:format]} Substitutes the value of the given field from the selected record.

Fields support appropriate .NET formats

For information on formatting specific data types, see Template Format Specifiers.

Template Format Specifiers

Field Type Supported Formats Examples

Single Line of Text

Multiple Lines of Text

See String Functions below.
{fullname:upcase}
JOHN DOE
{fullname:capitalize}
John Doe
{fullname:downcase}
john doe
{fullname:truncate(2)}
Jo
{fullname:replace('Doe','Joe')}
John Joe
Option Set

Standard Numeric Format Strings. Will format the ID for the option set item.

Custom Numeric Format Strings. Will format the ID for the option set item.

Custom :name format. Substitutes the text value for the option set item.

{new_type}
836000000
{new_type:N}
836,000,000
{new_type:name}
Default Type
{new_type:name|downcase}
default type
Two Options

Custom :name format. Substitutes the text value for the two-option set item.

{new_isapproved}
True
{new_isapproved:name}
Yes
{new_isapproved:name|upcase}
YES

Whole Number

Floating Point Number

Decimal Number

Standard Numeric Format Strings.

Custom Numeric Format Strings.

Custom :name format. Substitutes the culture-specific Dynamics 365 numerical display format.

{new_whole}
1024
{new_whole:D6}
001024
{new_decimal}
8.23
{new_decimal:F4}
8.2300
Date and Time

Standard Date and Time Format Strings

Custom Date and Time Format Strings

Custom :name format. Substitutes the culture-specific Dynamics 365 Date and Time display format.

Example date value: June 15, 2018, 1:15 PM; Culture: en-us

{createdon}
6/15/2018 1:45:30 PM
{createdon:O}
2018-06-15T13:45:30.0000000-07:00
{createdon:dd-MM-yy}
15-06-18
{createdon:name}
6/15/2018 1:45:30 PM

Lookup

Customer

Guid Format Specifiers. Will format the unique ID for customer or lookup record.

Custom :name format. Substitutes the primary display name for the customer or lookup record.

{new_customer}
ECC56DAFE1F44610A944FC3D896EAEA7
{new_customer:B}
{ECC56DAF-E1F4-4610-A944-FC3D896EAEA7}
{new_customer:downcase}
ecc56dafe1f44610a944fc3d896eaea7
{new_customer:name}
John Doe
{new_customer:name|truncate(4)}
John

Unique Identifier

Guid Format Specifiers.

Note: this usage is equivalent to the {id[:status]} substitution variable

{new_entityid}
ECC56DAFE1F44610A944FC3D896EAEA7
{new_entityid:B}
{ECC56DAF-E1F4-4610-A944-FC3D896EAEA7}
{new_entityid:downcase}
ecc56dafe1f44610a944fc3d896eaea7

String Functions

In addition to format specifiers, a set of functions for manipulating text fields can be included in templates using a similar syntax to format specifiers. Format specifiers and string functions may be chained together using the pipe | symbol. For example, to display a Unique Identifier field with the "B" format and all in lowercase, you can use the substitution template: {id:B|downcase}. You may chain together as many string functions as you wish, including repeating the same function.

Note: Format Specifiers must be placed first in a chained sequence.
Function Description Examples
capitalize

Capitalizes the first character of each word in the text.

Note: Words in all-uppercase may be interpreted as acronyms and not converted. In this scenario, it is recommended to use the downcase function first.

Example title value: "Product is not working"

{title: capitalize}
Product Is Not Working
upcase Converts the entire text to uppercase characters.
{fullname: upcase}
JOHN DOE
downcase Converts the entire text to lowercase characters.
{fullname: downcase}
john doe
truncate(characters) Truncates the text to the number of characters specified.

Example title value: "Product is not working"

{title: truncate(10)}
Product is
replace(oldText, newText) Replaces all instances of oldText with newText.

Example title value: "Product is not working"

{title: replace('is not working', 'FAILURE'))}
Product FAILURE
{title: replace('not ', ''))}
Product is working
substring(start[, length])

Returns only the text at the starting index, for the length of characters provided. Length is optional.

For more information, see the .Net String.Substring Method.

Example title value: "CASE ZX-001078: Product is not working"

{title: substring(5,9)}
ZX-001078
{title: substring(8)}
001078: Product is not working
{title: substring(5) | capitalize}
ZX-001078: Product Is Not Working

Warning: The following characters are not valid in a SharePoint URL: ~ " # % & * : > < ? / \ { | } .

These characters, while valid in the template, will be stripped from the generated relative URL and replaced with the - character.