admin管理员组文章数量:1415061
Apparently in earlier versions of Microsoft CRM it was possible to get record Guid in detail page of a record (eg: Account, Contact) using Javascript console, using synatax such as
Xrm.Page.data.entity.getId(); frames[0].Xrm.Page.data.entity.getId();
ref: /
I am unable to repeat this in CRM 2015.
> frames[0].Xrm.Page.data.entity.getId();
Unable to get property 'entity' of undefined or null reference
> Xrm.Page.data.entity.getId();
Unable to get property 'entity' of undefined or null reference
however:
> this
gives me dump that includes
USER_GUID: "{98D61030-7513-4EAA-A243-1D29FA99E0A0}",
Screen shot of IE Console
Apparently in earlier versions of Microsoft CRM it was possible to get record Guid in detail page of a record (eg: Account, Contact) using Javascript console, using synatax such as
Xrm.Page.data.entity.getId(); frames[0].Xrm.Page.data.entity.getId();
ref: https://crmbusiness.wordpress./2014/02/17/crm-2013-javascript-to-get-id-of-record/
I am unable to repeat this in CRM 2015.
> frames[0].Xrm.Page.data.entity.getId();
Unable to get property 'entity' of undefined or null reference
> Xrm.Page.data.entity.getId();
Unable to get property 'entity' of undefined or null reference
however:
> this
gives me dump that includes
USER_GUID: "{98D61030-7513-4EAA-A243-1D29FA99E0A0}",
Screen shot of IE Console
Share Improve this question edited Dec 18, 2015 at 17:26 Mustapha George asked Dec 18, 2015 at 16:17 Mustapha GeorgeMustapha George 2,53710 gold badges50 silver badges87 bronze badges 4- 1 can you see any errors in javascript console? – madox2 Commented Dec 18, 2015 at 16:22
- thanks for prompt reply. I added code & error to question. – Mustapha George Commented Dec 18, 2015 at 16:27
- 1 When do you call this code? On button click or page load, ...? – madox2 Commented Dec 18, 2015 at 17:11
- on console. See added image... – Mustapha George Commented Dec 18, 2015 at 17:27
1 Answer
Reset to default 5this is a change due to the new form rendering inside Dynamics CRM (also known as Turbo Forms)
you can try with
frames[1].Xrm.Page.data.entity.getId();
本文标签: get guid id from Microsoft CRMjavascript consoleStack Overflow
版权声明:本文标题:get guid id from Microsoft CRM - javascript console - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745231849a2648857.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论