Using Concur Expense to NetSuite : Importing Images to NetSuite - Attach to Multiple Expense Reports

I am using the “Concur Expense (Best Practices) - NetSuite” Integration from the Marketplace. In the “Concur expense report images to NetSuite expense report images” flow when it gets to the last step we are getting hundreds of errors all of the time. This is due to some expense reports being split into 2 reports inside NetSuite. I would like to attach the image(s) to all expense reports that match the search criteria being used. Right now it fails saying:
”A mapping error occurred. More than one match for "["custbody_mil_concur_report_id","is",""]" for the record type "Expense Report".”

Is there a way to attach to all reports instead of failing and not attaching to any?

Can you try adding a filter criteria for "main line" = 'T" on the import section of "how to find existing records"?

@tylerlamparter Thanks for the suggestion. However, I am not sure that is the fix. There is a high chance that it will find multiple Expense Reports in NetSuite with Concur ID since we split them out inside of NetSuite. The issue seems that it is finding 2 exp rpts when is does the search for the report(s) and then it errors out because the flow step has no idea how to attach the image to two transactions inside netsuite.

The last few lines of the request looks like this:

var rs = s.runSearch().getResults(0, 10);
rs.length: 2

Since rs.length is 2, it errors out.

Edit: in fact the search is already using the mainline is T. See below:

// initiate search
var fe = ["custbody_mil_concur_report_id","is","52DB9846612349C28C8D"];
var lookupSource = "expensereport";
var lookupValue = "internalid";
var s = nlapiCreateSearch(lookupSource, fe, [ new nlobjSearchColumn(lookupValue) ]);
// Final lookup filter expression
// fe: [[["custbody_mil_concur_report_id","is","52DB9846612349C28C8D"]],"AND",["mainline","is","T"]]

How do you know which one to attach the files to? Do all attachments go to both? You could make an individual lookup step to get all the expense reports for the given Concur ID, map those IDs back into your data, use a script to make an array of files and NetSuite records (if you have 2 expense reports and 3 files, your array would be a length of 6 where it's a cross join of the two). Then, use the one-to-many on the import step to attach the files to the records.

We would be fine with all attachments being attached to any and all Exp Rpts in NetSuite that reference the Concur Expense Report ID.

I am not sure how to create the lookup between the importing of the file into netsuite and the attaching of the image(s) to the exp rpt in netsuite.

Maybe you can come to office hours next week, read through the docs, and go through Celigo U training because lookups are a fundamental flow step type in Celigo.