Preset Document#MimeType based on document descriptor, in ClaimCenter

56 views Asked by At

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.

1

There are 1 answers

2
Abhijay Kumar On

I believe that document.MimeType gets set automatically, provided you are uploading a document having one of the mime types defined in config.xml and have a working implementation of the IDocumentProduction plugin. If the MimeType doesn't get set automatically in your case, you are either uploading an unrecognized file type or missing the mapping. The mimetypemapping tag in config.xml is used to configure the relationship between supported mime types, file extensions, and icons. e.g.

<mimetype name="text/xml" extensions=".xml" icon="html_mime"/>
<mimetype name="application/pdf" extensions=".pdf" icon="pdf_mime"/>

To make this value non-changeable, the easiest way is to mark the editable property of the File Type cell as false. 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 in DocumentValidationRules rule set and throw a reject error if a DB transaction tries to update the existing MimeType.