Felix Divall
02/20/2024, 2:15 PMfunction setPortugueseIdentifier(data: SpecificsData): void {
const request = data.request as Invoice
if (!request.customform) { return }
// data.rec.setValue({ fieldId: 'custpage_ptl_document_series_selection', value: 1 }) // 1: FT01
data.rec.setText({ fieldId: 'custbody_ptl_document_series_selection', text: 'FT01' })
const identifier = data.rec.getText({ fieldId: 'custbody_ptl_document_series_selection' })
log.debug('identifier', identifier)
}
"name": "PTL_ERROR",
"message": "This transaction can't be saved because the document series identifier is missing or the selected document series identifier is invalid.<br>The document series identifier is rendered invalid if it was recently inactivated or deleted, or its properties (for example, start and end dates) were edited before you saved this transaction.<br>Go to the Portugal Transaction subtab to edit the <b>Document Series Identifier</b> list and save the transaction again."
battk
02/20/2024, 11:59 PMFelix Divall
02/21/2024, 7:24 AMconst identifierField = data.rec.getField({ fieldId: 'custpage_ptl_document_series_selection' })
const identifierFieldOptions = identifierField.getSelectOptions()
log.debug('identifierFieldOptions', identifierFieldOptions)
Cannot read property 'getSelectOptions' of null
battk
02/21/2024, 7:45 AMbattk
02/21/2024, 7:45 AM