Hello,
I have 3 Record types with different project statuses (In Progress, Closed and Deleted).
For the In Progress and Closed record types I have an related action which changes the project status from In Progress to Deleted and from Closed to Deleted.
Once the related actions returns back after completion the project doesn't have the previous status anymore and it cannot be found in that Record Type also.
The message that I receive is:" An Error has occurred, The record data does not exist, has been deleted, or you do not have sufficient privileges to access it" thing which make sense.
In order to avoid this thing I would like to redirect user to main site of the application in the same tab. (Appian version is still 20.4)
I have been searching in all the topics but unfortunately no solution was found.
Do you have any idea?
Thank you!
Discussion posts and replies are publicly visible
Hi Andrei Iordache,
As far as I understand your problem it is showing error because the record is already deleted so there is no record to display , so after the related action is completed you can create another interface in which you can show the record is deleted successfully and there you can provide a link to return to home page .
Thanks,
hi Arun Dubey thank you for your response.
Actually I did that and I get redirected in a new tab and the old one remains with the error message.
I saw that with the version 21.1 of Appian you can use the function a!safeLink() with the following parameters:
Open Link In
openLinkIn
Text
(Browser-Only) Determines where the linked content should open. Valid values: "SAME_TAB", "NEW_TAB" (default).
"SAME_TAB"
"NEW_TAB"
If you have an User Interface which has the a!safeLink() as a button you cannot submit the form.
The only solution to submit the form using the a!safeLink() is to set a 1 min timer and then to move it forward, which actually isn't such a good solution.
Do you have other ideas or how to provide the link inside the record type in the same tab and at the same time to have a submit value?
I think the main way to do this is to separate it into two forms:
If you do it this way, your user should never see the error message, and you can include whatever information you want to on the confirmation form.
Hi Peter Lewis
Thank you for your response.I still have Appian 20.4 and the a!safelink() with parameters openLinkIn is available since 21.1.Also in my application's site I used interfaces based on the record types (a!gridfield()) so I can have multiple Subtabs. Also using the a!safelink() will work for me only if I save the Site or the Task Report (interfaces that were saved as task report to be used for the site) in a constant and then pass it by (since), but still that will be available with 21.1.
Do you think it is still possible to do it with the version 20.4?
While you're in 20.4, an easier option might be to just leave the user at the submit-button-less task, and include an instruction that they should click "Home" or whatever other site tab they can use to navigate back to a neutral starting point.
However upon re-reading your initial use case, it seems like you could instead provide a link on this task using a!recordLink(), pointing to the "deleted" record type, using the primary ID of the entry that was "deleted" via the related action. It seems to me that this would take the user straight to that record (since a!recordLink's old default behavior was to open the link in the same tab, which is sometimes annoying but useful in your use case).
As an aside, this is a good example of why I prefer *not* to split one data type out into separate Record Types based on status. I've used that approach here and there in the past and it has never been worth the extra trouble. Instead, I suggest lumping all statuses together in the same record type, and just applying a filter that defaults to only show "active" ones unless the user specifically selects otherwise).
Agreed with Mike - the main point is to set up the multiple tasks to redirect the user upon submission. There are probably a lot of options you have for the second task to then tell the user what steps they should take next.
Hi,
I have managed to solve it by using a!reportLink() and as a report I used the constant with the value of the Task Report that is used in the Site.
Thank you very much for all the help!