{"id":1552,"date":"2018-03-16T10:13:43","date_gmt":"2018-03-16T09:13:43","guid":{"rendered":"https:\/\/help.cirrus-shield.com\/docs\/developer-guide\/javascript-library\/get-data-by-id\/"},"modified":"2024-12-20T15:05:40","modified_gmt":"2024-12-20T14:05:40","slug":"get-data-by-id","status":"publish","type":"docs","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/get-data-by-id\/","title":{"rendered":"Get Data By ID"},"content":{"rendered":"<p>This function is used to get the record details based on the record id provided and it returns the data of the field names provided.<\/p>\n<p><strong>Function:<\/strong> GetDataByID(&lt;Record GUID&gt;, &lt;Object Name&gt;, &lt;Field Names&gt;)<\/p>\n<p><strong style=\"color: initial;\">Optional Parameter:<\/strong><span style=\"color: initial;\"> useLocaleFormatting [bool]: allows returning fields of type Date\/DateTime\/Number\/Currency\/Percent in the user&#8217;s locale format. translate to french<\/span><\/p>\n<p><strong>Usage:<\/strong> var Task = GetDataByID(GetRecordGUID(),&#8221;Task&#8221;, &#8220;Id,Name,Start,End,Description,Location,Attendees,OwnerId&#8221;);Or<\/p>\n<p>var\u00a0Task=\u00a0GetDataByID(1332647461507827571,&#8221;Task&#8221;,&#8221;Id,Name,Start,End,Description,Location,Attendees,OwnerId&#8221;);Output:Success:The object can be used like this:- Task.Id- Task.NameFailure:An error message will be displayed<\/p>\n<p><!-- 34b427972470781fc55dfb47061c005a --><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":945,"menu_order":10,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_tag":[],"class_list":["post-1552","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/comments?post=1552"}],"version-history":[{"count":7,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1552\/revisions"}],"predecessor-version":[{"id":11189,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1552\/revisions\/11189"}],"up":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/945"}],"next":[{"title":"Get Data By Column","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/get-data-by-column\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1553"}],"prev":[{"title":"Get Selected Record GUIDS","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/javascript-library\/get-selected-record-guids\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1551"}],"wp:attachment":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/media?parent=1552"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/doc_tag?post=1552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}