Requirement is to display different images for different records in the record l

Requirement is to display different images for different records in the record list view. Plan is to store the image in Documents and then have the Doc ID of the document placed in the corresponding record in the SQL Server database.

What is the correct data type and length for storing the document identification number? On a related note, when the application is moved to higher environment, will the Doc ID be retained as is or should I have a process to validate this?...

OriginalPostID-131507

OriginalPostID-131507

  Discussion posts and replies are publicly visible

Parents
  • From what I can tell the document ID is always an integer, easy enough right? The tricky part is moving between environments. I've observed that the id is anything but static and not a good reference.

    The solution will of course depend on your situation. The way I've done this is to use a constant of type "Document" to store the reference to the actual document in the system. This reference will stay up to date through updates, migration, or whatever. Then I use some other field in the record (status, loan type, user, or anything really) to determine which image is selected for the listing.

    This approach works well if the image is pre-determined in the system, if it's unique to each record and can't be pre-determined this probably won't work.
Reply
  • From what I can tell the document ID is always an integer, easy enough right? The tricky part is moving between environments. I've observed that the id is anything but static and not a good reference.

    The solution will of course depend on your situation. The way I've done this is to use a constant of type "Document" to store the reference to the actual document in the system. This reference will stay up to date through updates, migration, or whatever. Then I use some other field in the record (status, loan type, user, or anything really) to determine which image is selected for the listing.

    This approach works well if the image is pre-determined in the system, if it's unique to each record and can't be pre-determined this probably won't work.
Children
No Data