GenericValue customMethod = costComponentCalc.getRelatedOne("CustomMethod");
if (customMethod == null) {
// TODO: not supported for CostComponentCalc entries directly associated to a product
Debug.logWarning("Unable to create cost component for cost component calc with id [" + costComponentCalc.getString("costComponentCalcId") + "] because customMethod is not set", module);
} else {
Map<String, Object> costMethodResult = dispatcher.runSync(customMethod.getString("customMethodName"),
UtilMisc.toMap("productCostComponentCalc", productCostComponentCalc,
"costComponentCalc", costComponentCalc,
"costComponentTypePrefix", "ACTUAL",
"baseCost", totalCost,
"currencyUomId", (String)partyAccountingPreference.get("baseCurrencyUomId"),