CultureName is ignored when generating documents or substituting template variables
Status: Reported
Description
- Create a SuperOffice document template with the {date} template variable
- Generate a document using this template - notice that the date is formatted according to your local date format settings
- Use the following script to generate the document using the document template you generated:
#setLanguageLevel 3;
NSListAgent listAgent;
NSDocumentAgent documentAgent;
Integer documentTemplateId = 0;
Integer contactId = 0;
NSDocumentEntity documentEntity = documentAgent.CreateDefaultDocumentEntity();
NSDocumentTemplate documentTemplate = listAgent.GetDocumentTemplate(documentTemplateId);
documentEntity.SetDocumentTemplate(documentTemplate);
documentEntity.SetName("sample_bug_culture" + getCurrentDateTime().toString("YY4MM2DD2_HH24MI2SS2") + ".docx");
documentEntity.SetHeader("sample_bug_culture" + getCurrentDateTime().toString());
documentEntity.SetDate(getCurrentDateTime());
documentEntity = documentAgent.SaveDocumentEntity(documentEntity);
Map customTags;
documentAgent.CreateNewPhysicalDocumentFromTemplateWithCustomTags2(contactId, 0, 0, documentEntity.GetDocumentId(), 0, 0, 0, customTags, "nl-NL");
Observed that: the date in the document is not formatted using the nl-NL culture, or any other culture you pass in that method.
Expected that: the formatting of a specific would work when using the script.
info
Vennligst logg inn for å kommentere
Detaljer
Problemet id | 37238 |
Registrert | 21 des. 2022 |
Sist endret | 11 jul. 2024 |
Alvorsgrad | Medium |
Område | Sales |
Status | Reported |
Målversjon | |
Type | Bug |
track_changes
Follow
info