Skip to main content
sivasuryap0002
Known Participant
Nov 29, 2022 5:58 AM UTC
Question

Error Handling in Interface

Hi,

How to Handle Errors in interface level,
I have a Scenario where we are passing list of document Id's to interface and if any documents is  deleted the the UI is throwing an error,
We want to handle it like if the function document is throwing an error , we want to handle it in a way that particluar docid should be removed from the list of inputs or that execution should be skipped.

How can we achieve this?

Thanks is Advance,
SSP

5 replies

Inspiring
Nov 29, 2022 6:07 AM UTC

Hi,
Please create a rule to find that the document is present or not in the system before using the ids anywhere.
I am sending you the code in a min.

Thank you.

Inspiring
Nov 29, 2022 6:08 AM UTC

if(
rule!A_checkNullInteger(ri!documentId),
false(),
with(
local!contentData: getcontentobjectdetailsbyid(ri!documentId),
local!isDocumentValid: and(
not(
exact(
local!contentData,
"No object with this ID has been found"
)
),
find("Type: Document", local!contentData)
),
local!isDocumentValid
)
)

Inspiring
Nov 29, 2022 6:11 AM UTC

Please modify this code according to your use.

Inspiring
Nov 29, 2022 6:15 AM UTC

And also you can use this plugin "getcontentobjectdetailsbyid" if you want to fetch or retrieve any information at the run time for your any uploaded document id or any id.