Development

Quick and dirty way to get current record Object Type Code

Sometimes you need to get Object Type Code of current opened record. Yes, it’s safer to use supported ways like call to metadata through endpoints but sometimes you can ignore that recommendation. So the trick is:

var context = Xrm.Page.context;
var params = context.getQueryStringParameters();
var objectTypeCode = params.etc;

 

1 Comment

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.