Skip to main content
sivasuryap0002
November 29, 2022
Question

Error Handling in Interface

  • November 29, 2022
  • 5 replies
  • 0 views

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

November 29, 2022

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.

November 29, 2022

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
)
)

November 29, 2022

Please modify this code according to your use.

November 29, 2022

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.