Going Over Field Label Maximums in Dynamics 365 Power Apps

Leave a comment

In this post, we will look at field label maximum sizes and how to overcome them.

Let’s look at the account name of an Account record. The size of the record is 160 characters:

Now what if we want to go over this? Let’s look at the label of the name:

Let’s create a string greater than 160 characters, i.e. 161 characters:

If we paste this into the label field, it truncates the last character, so the total length is still 160:

To overcome this, let’s use JavaScript to set the field label. We will use Xrm.Page but you should use formContext:

Xrm.Page.getControl(“name”).setLabel(“12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901”);

Or

formContext.getControl(“name”).setLabel(“12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901”);

We see the label is now above 160 characters:

Or a really really long label:

 

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *