I am working in guidewire ClaimCenter and trying to make this input (Document#MimeType) have its value preset and non-changable based on what the document descriptor has.
How can I achieve this?
I have no clue as to how I am supposed to proceed with this, and therefore havent been able to try anything yet. There doesnt seem to be a way to instantiate and call on a value in the document descriptor.
Please forgive me if I didnt make it clear, I am very new to this.
I believe that
document.MimeType
gets set automatically, provided you are uploading a document having one of the mime types defined inconfig.xml
and have a working implementation of the IDocumentProduction plugin. If theMimeType
doesn't get set automatically in your case, you are either uploading an unrecognized file type or missing the mapping. Themimetypemapping
tag inconfig.xml
is used to configure the relationship between supported mime types, file extensions, and icons. e.g.To make this value non-changeable, the easiest way is to mark the
editable
property of the File Type cell asfalse
. This will ensure that the user is unable to override the Mime Type for the uploaded document once it has been set by the DocumentProduction plugin. Another way to enforce this at the platform level and not just on the UI would be to add a validation rule inDocumentValidationRules
rule set and throw areject
error if a DB transaction tries to update the existingMimeType
.