Item ID in jsvascript
How can i get the ID or uniqId of the current item?
The calculated column workaround is not really a good idea, since i get 62644 from sp.js which is != 62.644 ( the value is get from fd.field('my copy of item ID').value() ).
this thing here also does not solve the problem: The field is empty:
<xsl:value-of select="@ID" />
Thanks, Armin
The calculated column workaround is not really a good idea, since i get 62644 from sp.js which is != 62.644 ( the value is get from fd.field('my copy of item ID').value() ).
this thing here also does not solve the problem: The field is empty:
<xsl:value-of select="@ID" />
Thanks, Armin
Are you trying to get the current entity ID when you're on a form? Try this:
Code: Select all
GetUrlKeyValue('ID');
You cannot get the ID of a new item until that new item has been created (as that's when the ID is generated).
However, if you are trying to tie a new item to the current item, you can use the related items control in grid mode for this, check this article: http://spform.com/forms-designer- ... point-form
Otherwise, please tell us what you are trying to achieve and we'll try to help you out.
However, if you are trying to tie a new item to the current item, you can use the related items control in grid mode for this, check this article: http://spform.com/forms-designer- ... point-form
Otherwise, please tell us what you are trying to achieve and we'll try to help you out.
Or, if you are trying to get the ID of the parent item from a new item form that is opened in dialog mode, try this:
This will work only if the parent form is the topmost form in the browser. There is a way to retrieve the parent form when it is not the topmost, give us a shout if you need it.
Code: Select all
window.top.GetUrlKeyValue('ID');
Hi Rostislav,
actually did the trick. Stupidity prevented me from realizing this earlier....Thanks!
-Armin
Code: Select all
GetUrlKeyValue('ID');
-Armin
-
- Information
-
Who is online
Users browsing this forum: No registered users and 5 guests