cancel
Showing results for 
Search instead for 
Did you mean: 

Control the URL redirection after the create of a document

Smart_amp_Soft_
Confirmed Champ
Confirmed Champ

Hello,

I want to control the URL redirection after a specific document is created. The redirection is to move to the parent folder.

Should it's possible to do that easily or i have to create a custom User Action with UI Document creation, get parent and navigate ?

Thanks.

1 ACCEPTED ANSWER

bruce_Grant
Elite Collaborator
Elite Collaborator

I extended the DocumentActionsBean and used the SaveDocument method to achieve this, add in validations, auto-calculate some field values, etc. Modified the line navigationContext.navigateToDocument(newDocument, "after-create") to use parentDoc instead of newDocument. Worked in 5.5 and 5.6 but haven't tried in 5.7/8.

View answer in original post

5 REPLIES 5

bruce_Grant
Elite Collaborator
Elite Collaborator

I extended the DocumentActionsBean and used the SaveDocument method to achieve this, add in validations, auto-calculate some field values, etc. Modified the line navigationContext.navigateToDocument(newDocument, "after-create") to use parentDoc instead of newDocument. Worked in 5.5 and 5.6 but haven't tried in 5.7/8.

Thanks a lot, very helpfull ... I have a last question ... How i extend the current DocumentActionsBean and SaveDocument action ? Everytime i'm trying i have an error because i'm using the same component name (documentActions)

Did you add an @Install just after @Scope to make sure your extended component with the same name has higher precedence?

Also, not sure if it's still necessary, I also extended the DocumentActions interface and then had my custom DocumentActionsBean implement that (I recall getting another error otherwise)

I added the missing @Install and it's work, thanks !

Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.