| 130 | } |
| 131 | |
| 132 | export function buildAttachFileUrl( |
| 133 | base: string, |
| 134 | params: AgiloftBaseParams & { recordId: string; fieldName: string }, |
| 135 | fileName: string |
| 136 | ): string { |
| 137 | const { kb, table } = encodeTable(params) |
| 138 | const recordId = encodeURIComponent(params.recordId.trim()) |
| 139 | const fieldName = encodeURIComponent(params.fieldName.trim()) |
| 140 | const encodedFileName = encodeURIComponent(fileName) |
| 141 | return `${base}/ewws/EWAttach?$KB=${kb}&$table=${table}&$lang=en&id=${recordId}&field=${fieldName}&fileName=${encodedFileName}` |
| 142 | } |
| 143 | |
| 144 | export function buildGetChoiceLineIdUrl( |
| 145 | base: string, |