Hey all.. Can anyone please help he to solve this below.. public static Map<String,Object> getEmail(DispatchContext ctx,Map<String, ? extends Object> context) throws GenericEntityException, SQLException, GenericServiceException{ LocalDispatcher dispatcher=ctx.getDispatcher(); Map<String,Object> successResult=ServiceUtil.returnSuccess(); String partyId="10035"; Map<String, Object> input=UtilMisc.toMap("partyId",partyId); Map<String, Object> serviceResult=dispatcher.runSync("getPartyEmail", input,360,true); String email=""; if(serviceResult != null) { email=(String)serviceResult.get("emailAddress"); successResult.put("outValue", email); } else { successResult.put("outValue", "Returns a null Value"); } return successResult; }
Trying to retrive the email address of a partyId..using the out of the box service Named as getPartyEmail...but it's returning a null value for email... Thank You..