---
title: "onAssignedDocumentDidWithdraw(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/onassigneddocumentdidwithdraw(_:)"
---

# onAssignedDocumentDidWithdraw(_:)

Adds an action to perform after an assigned document submission has been withdrawn.

## Declaration

```swift
@MainActor @preconcurrency func onAssignedDocumentDidWithdraw(_ action: @escaping (URL) -> Void) -> some View

```

## Parameters

- `action`: An asynchronous closure that receives the document URL and executes after successful submission withdrawal.

## Return Value

Return Value A view that executes the specified action after submission withdrawal.

## Discussion

Discussion This action runs regardless of whether you provided an onAssignedDocumentWillWithdraw(_:) action, and only runs if the withdrawal completes successfully. AssignedDocumentSubmissionButton(documentURL: documentURL)     .onAssignedDocumentDidWithdraw { url in         // Handle successful withdrawal         logEvent("Assigned document withdrawn successfully!")     }

## See Also

### Submission

- [onAssignedDocumentDidSubmit(_:)](swiftui/view/onassigneddocumentdidsubmit(_:).md)
- [onAssignedDocumentWillSubmit(_:)](swiftui/view/onassigneddocumentwillsubmit(_:).md)
- [onAssignedDocumentWillWithdraw(_:)](swiftui/view/onassigneddocumentwillwithdraw(_:).md)
- [onSubmit(of:_:)](swiftui/view/onsubmit(of:_:).md)
- [submitScope(_:)](swiftui/view/submitscope(_:).md)
- [submitLabel(_:)](swiftui/view/submitlabel(_:).md)
