Acting on action errors

The last parameter for the ActionStatus_LogError() function is the ListStatusLineUserDefData composite field, which allows you to store additional data regarding the item that failed. The composite has the following components:

 

This composite field is one of the parameters passed to the ActOnActionError procedure. This procedure runs when the user double-clicks a specific error in the Status Detail Message window. It is typically used to navigate to a location where the user can correct the error that occurred while the action was processing. The ActOnActionError procedure has the following parameters:

in integer ListDictID;
in integer ListID;
in long ActionID;
in long ErrorID;
in string RecordID;
in ListStatusLineUserDefData UserDefData;

You can create a procedure trigger for the ActOnActionError procedure defined for the list you are creating an action for. The trigger processing procedure should run after the procedure defined for the list. The following example registers a procedure trigger for the ActOnActionError procedure defined for the Customer list.

l_result = Trigger_RegisterProcedure(script ActOnActionError of form ListObj_Customers, TRIGGER_AFTER_ORIGINAL, script IG_ActOnCustomerActionError);
if l_result <> SY_NOERR then
	warning "Procedure trigger registration for ActOnActionError of form ListObj_Customers failed.";
end if;

In the trigger processing procedure you can perform any needed action to correct the error, such as opening the appropriate maintenance window where the problem can be resolved.

For example, the following is the IG_ActOnCustomerActionError procedure for the sample integrating application. This procedure runs in response to the user clicking on a list action error logged by the sample integration. If the action was the Update Contact Date action, the Contact History window will be opened, allowing the user to supply the initial contact information. Notice how the first long integer value in the user-defined data is verified to be sure the error was generated by the sample integrating application.

in ListDictID nListDictID;
in ListID nListID;
in ActionID nActionID;
in ErrorValue nErrorID;
in Reference sRecordID;
in ListStatusLineUserDefData UserDefData;

{Is this our action to process?}
if nListID = LISTID_CUSTOMERS then
	{Look at the user-defined data to verify that the product ID is included}
	if UserDefData:'User Defined LongInt01' = IG_PROD_ID then
		if nActionID = ACTION_UPDATE_CONTACT_DATE then
			{Open the Contact History window}
			call IG_Trigger_Open_Contact_History;
		end if;
	end if;
end if;


Documentation Feedback