- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2017 05:58 AM
> What are major difference between these fields.?
> Are there any scenarios where we can prefer document id over reference field?
> What should i consider if i decide to change the datatype of a field?
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2017 06:01 AM
Hi Prasanna,
> What are major difference between these fields.?
A reference field uses a related table field to point to a specific record in the prescribed table. E.g. caller is a reference to sys_user.
A document_id field can point to any record on any table. It includes the table as well as the record reference (e.g. Incdient: INC0010013)
> Are there any scenarios where we can prefer document id over reference field?
I generally don't use document_ids in my apps as I don't want to give the user the ability to point to any record on any table. I like to keep control on what is being used so I know what fields I have access to on the target record.
Document_ids are useful for things such as logging where you may not know the table the record points to.
> What should i consider if i decide to change the datatype of a field?
Be aware that changing a data type on a field can lose all data in that field (the column is effectively blanked out.) Always backup your entire table and test first!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2020 06:49 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 06:04 AM
I would need to know more about your use case. If there's already a reference field (or related list) to incident, then I recommend using that.
Good timing on this response, I'm doing an episode of NowCommunity Live Stream on document IDs today. Here's the YouTube link, I'll post the community link after I finish broadcasting/recording.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 03:16 PM
Here is the community link with the video from this morning.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2020 06:49 PM