Sometimes when I am coding I need the guid of an account, contact etc so I can put it in my code and retrieve one account.
The quickest way I have found to get this from CRM is to go into the account form or the form you want the guid from.
Then press F11, this will maximise the screen. It also shows the url bar at the top. You can then
The guid is the bit after ID and up to the %26
id%3d%257b92EB0D0E-B22E-E011-9645-00155D106B02%257d%26
the b%3d%257 is the first curly bracket { and the %257d%26 is the closing curly bracket, take those out and you are left with the guid
92EB0D0E-B22E-E011-9645-00155D106B02
Thanks for this post it has really been very helpful!
Just a detail (as it tripped me up), when you say:
“the b%3d%257 is the first curly bracket”
You actually mean to say:
“the %3d%257b is the first curly bracket”
I was leaving the leading b in the GUID and as a result nothing was working. All good now.
Thanks again.
LikeLike
Good arcticle.
Another way of getting GUID from form’s URL.
http://rajeevpentyala.wordpress.com/2012/02/09/reading-the-guid-of-record-from-crm-form-url/
LikeLike
That’s a great way to get the guid
LikeLike
Hey! I know this is somewhat off topic but I was wondering if you knew where I could find
a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having trouble finding one?
Thanks a lot!
LikeLike
This is the easiest way I’ve found, gives you a popup with the ID of any CRM 2011 post.. Basically a refinement of the above method..
http://www.syntaxwarriors.com/2013/get-guid-of-any-crm-2011-entity-post/
LikeLike
Press F12 to open the developer console, Click the script tab, and in the bottom right, next to the >> type in:
frames[0].Xrm.Page.data.entity.getId()
If you need to call any Xrm function from the context of the javascript console, you can do so by prefacing it with frames[0].
LikeLike
@Michael, thanks for that tip. We’ve been migrated to CRM 2013 and the GUID is no longer displayed in the URL! Your tip worked for me (but only in Internet Explorer).
LikeLike
Nice, thank you!
LikeLike
The Javascript thing didn’t work for me in 2013, frames[0].Xrm.Page.data was null. I just selected the “email a link” option from the More Actions “…” button at the top of the form. Everything between &id%7b and the next %7b is the GUID.
LikeLike
if you start debugging and then press F12 and then type
frames[0].Xrm.Page.data.entity.getId()
you will get the guid. IT worked for me on an account record
LikeLike
More than one way to skin a cat 🙂
LikeLike