Codeunit 4582 "SOA Retrieve Emails"
SalesOrderAgent · Microsoft.Agent.SalesOrderAgent
Across versions
- BC23-28not present
- BC29-30present
Neighbourhood 13 connected objects and pages
SalesOrderAgent · Microsoft.Agent.SalesOrderAgent · BC29-30 · source at 4e6a307c · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Internal |
| TableNo | SOA Setup |
| Permissions | tabledata “Email Inbox” = rd |
Events published
OnAddEmailToAgentTask(SOASetup: Record "SOA Setup"; var SOAEmail: Record "SOA Email")(internal)- subscribers: Codeunit 4582 “SOA Retrieve Emails” OnAddEmailToAgentTaskSubscriber
OnAfterProcessEmail(EmailInboxId: BigInteger)(internal)- subscribers: Codeunit 4582 “SOA Retrieve Emails” OnAfterEmailProcessed
Event subscriptions
- OnAddEmailToAgentTaskSubscriber subscribes to Codeunit “SOA Retrieve Emails” OnAddEmailToAgentTask
- OnAfterEmailProcessed subscribes to Codeunit “SOA Retrieve Emails” OnAfterProcessEmail
- OnBeforeDeleteSOAEmailEvent subscribes to Table “SOA Email” OnBeforeDeleteEvent
Procedures
AddEmailInboxToSOAEmails(SOASetup: Record "SOA Setup"; var EmailInbox: Record "Email Inbox")AddEmailToNewAgentTask(var SOASetup: Record "SOA Setup"; var EmailInbox: Record "Email Inbox"; var SOAEmail: Record "SOA Email")AddEmailToExistingAgentTask(SOASetup: Record "SOA Setup"; EmailInbox: Record "Email Inbox"; var SOAEmail: Record "SOA Email")GetAgentTaskTitle(SenderName: Text[250]): Text[150](internal)
Plus 7 local procedures.
Triggers
OnRun
Relations
- runs on Table 4325 “SOA Setup”
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 4400 “SOA Setup” (18 calls:
AddEmailAttachmentToTaskMessage → DocumentExceedsPageCountThreshold,AddEmailAttachmentToTaskMessage → GetFeatureName,AddEmailAttachmentToTaskMessage → GetMaxAttachmentSizeInBytes, …) - Codeunit 8904 “Email Message” (14 calls:
AddEmailAttachmentToTaskMessage → Attachments_First,AddEmailAttachmentToTaskMessage → Attachments_GetContent,AddEmailAttachmentToTaskMessage → Attachments_GetContentType, …) - Codeunit 8703 “Feature Telemetry” (9 calls:
AddEmailAttachmentToTaskMessage → LogError,AddEmailAttachmentToTaskMessage → LogUsage,AddEmailToAgentTask → LogUsage, …) - Codeunit 4315 “Agent Task Builder” (4 calls:
AddEmailToAgentTask → TaskExists,AddEmailToNewAgentTask → Create,AddEmailToNewAgentTask → GetAgentTaskMessageCreated, …) - Codeunit 4316 “Agent Task Message Builder” (4 calls:
AddEmailAttachmentToTaskMessage → AddAttachment,AddEmailToExistingAgentTask → Create,AddEmailToExistingAgentTask → Initialize, …) - Codeunit 8901 “Email” (3 calls:
AddEmailInboxToSOAEmails → ApplyEmailCategory,AddEmailInboxToSOAEmails → MarkAsRead,RetrieveEmails → RetrieveEmails) - Codeunit 4396 “SOA Email Setup” (2 calls:
RetrieveEmails → GetEmailCountProcessedWithin24hrs,RetrieveEmails → GetMaxNoOfEmails) - Codeunit 4398 “SOA Task Message” (2 calls:
AddEmailToExistingAgentTask → MessageRequiresReview,AddEmailToNewAgentTask → MessageRequiresReview) - Codeunit 4590 “SOA Billing” (2 calls:
AddEmailToExistingAgentTask → LogEmailRead,AddEmailToNewAgentTask → LogEmailRead) - Codeunit 4587 “SOA Impl” (1 call:
RetrieveEmails → GetProcessLimitPerDay)
Called by
- Codeunit 4415 “SOA Create Task Impl” (1 call:
CreateTask → GetAgentTaskTitle) - Codeunit 4586 “SOA Dispatcher” (1 call:
RunSOAgent → (object))
Recent changes
- 2026-10-14 #9359 Sales Order Agent: ignore attachments larger than 25 MB during email retrieval (main, BC30, fix)
- 2026-09-06 #11063 Prevent Sales Order Agent from skipping emails moved into monitored folders (main, BC30, fix)
- 2026-08-30 #10567 SOA : Create Task from TaskPane respects review configuration for known senders (main, BC30, fix)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Managing agent tasks programmatically (preview) — possibly related: Explains managing agent tasks programmatically through email triggers and events (model-linked)
- Process sales quotes and orders with Sales Order Agent — possibly related: Documents how Sales Order Agent retrieves and processes emails for order creation (model-linked)
Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "SOA Retrieve Emails"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.