Commit acaac80
Default new E-Document services to import v2 and let users select the draft format (#9702)
## Why
New E-Document services should default to the **v2 import pipeline** and
let users actually configure it end-to-end. This needs two things that
belong together:
1. Making the **Import Process** selector visible on the service card
and defaulting new services to **Version 2.0**.
2. Letting the user pick the **format** v2 needs to read an incoming
structured document into a draft.
That format is the service-level `"Read into Draft Impl."` field (table
6103, field 33). For already-structured formats such as **PEPPOL XML**
the "Structure received data" step returns `Unspecified`, so
`ImportEDocumentProcess.ReadIntoDraft` falls back to this service field:
```al
if EDocument."Read into Draft Impl." = "E-Doc. Read into Draft"::Unspecified then
EDocument."Read into Draft Impl." := EDocument.GetEDocumentService()."Read into Draft Impl.";
```
If the service field is also `Unspecified`, `E-Doc. Unspecified Impl.`
runs and import fails with **"No method to read the e-document has been
provided."** Defaulting to v2 without exposing this field would leave
users unable to make v2 work.
## What
- Default new services to `Import Process` = **Version 2.0**
(`InitValue`) and remove `Visible = false` on the selector.
- Pin the **ForNAV** connector service to Version 1.0 at creation (its
inbound is not migrated to v2).
- Add `"Read into Draft Impl."` to the **Purchase Draft** group on the
service card (shown only for Version 2.0), captioned **Draft Format**,
with a tooltip covering PEPPOL vs. auto-resolved PDF/ADI.
- Update module docs and add tests: new services default to v2, and the
draft format is selectable and persisted for v2.
[AB#580191](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/580191)
---------
Co-authored-by: Magnus Hartvig Grønbech <magnushar@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 57f500b9-871d-4cf4-bdc1-751bea22d0911 parent 7b0e5c1 commit acaac80
8 files changed
Lines changed: 68 additions & 4 deletions
File tree
- src/Apps/W1
- EDocumentConnectors/ForNAV/App/src/Setup
- EDocument
- App
- docs
- src/Service
- docs
- Test/src
- Processing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
| 802 | + | |
802 | 803 | | |
803 | 804 | | |
804 | 805 | | |
| |||
816 | 817 | | |
817 | 818 | | |
818 | 819 | | |
| 820 | + | |
819 | 821 | | |
820 | 822 | | |
821 | 823 | | |
| |||
834 | 836 | | |
835 | 837 | | |
836 | 838 | | |
| 839 | + | |
837 | 840 | | |
838 | 841 | | |
839 | 842 | | |
| |||
969 | 972 | | |
970 | 973 | | |
971 | 974 | | |
| 975 | + | |
972 | 976 | | |
973 | 977 | | |
974 | 978 | | |
| |||
983 | 987 | | |
984 | 988 | | |
985 | 989 | | |
| 990 | + | |
986 | 991 | | |
987 | 992 | | |
988 | 993 | | |
| |||
996 | 1001 | | |
997 | 1002 | | |
998 | 1003 | | |
| 1004 | + | |
999 | 1005 | | |
1000 | 1006 | | |
1001 | 1007 | | |
| |||
1010 | 1016 | | |
1011 | 1017 | | |
1012 | 1018 | | |
| 1019 | + | |
1013 | 1020 | | |
1014 | 1021 | | |
1015 | 1022 | | |
| |||
1023 | 1030 | | |
1024 | 1031 | | |
1025 | 1032 | | |
| 1033 | + | |
1026 | 1034 | | |
1027 | 1035 | | |
1028 | 1036 | | |
| |||
1037 | 1045 | | |
1038 | 1046 | | |
1039 | 1047 | | |
| 1048 | + | |
1040 | 1049 | | |
1041 | 1050 | | |
1042 | 1051 | | |
| |||
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1443 | 1443 | | |
1444 | 1444 | | |
1445 | 1445 | | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
1446 | 1491 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
445 | 446 | | |
446 | 447 | | |
447 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
448 | 452 | | |
449 | 453 | | |
450 | 454 | | |
| |||
0 commit comments