Search documents
search_documentsList a weclapp record's document attachments (up to a 100 limit) so you can download one by id.
Args:
entity_id: Weclapp id of the record whose attachments to list.
entity_name: Target entity type — one of DOCUMENTABLE_ENTITIES
(article, blanketPurchaseOrder, blanketSalesOrder, comment, contract,
incomingGoods, opportunity, party,
performanceRecord, purchaseInvoice, purchaseOrder,
purchaseOrderRequest, quotation, salesInvoice, salesOrder,
shipment, task, ticket, transportationOrder, warehouse).
entity_type: Alias for entity_name. Pass only one.
limit: Maximum number of documents to return. Clamped to 100.
Returns:
Documents under a results list (each with the id to feed
download_document, file name under content, media type and
size). Comment owners also include the validated authorization
parent. untrusted_content=True when any row is returned.
when_to_use: Call before download_document — a document id is only obtainable by listing an entity's attachments. Also call after an upload (preview_upload_document + execute_approved) to confirm the file is attached. preconditions: entity_name must be documentable; caller needs read access to the target entity. A comment ID is authorized through its canonical parent entity, never through synthetic comment access. post_effects: None. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| entity_id | Yes | ||
| entity_name | No | ||
| entity_type | No | ||
| correlation_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||