hey rishi.. Thank you for the reply... I have prepared the method just for checking weather it is returning me the email ID or not.. Some how i have manage to get the email id.. By passing the userLogin IN Parameter along with the partyId... Before that it was giving error something like this... Error in Service [getPartyEmail]: You must be logged in to complete the [Get the email of the party] process.... Anyway Thank you guys...
On Wed, Oct 17, 2018 at 5:19 PM Rishi Solanki <rishisolan...@gmail.com> wrote: > Hi Madhi, > I have loaded the data you provided in email over demo trunk [1] and able > to run the getPartyEmail service successfully. > You must did something wrong in your code, and I guess what Aditya noticed > partyId as 10035 is hardcoded in your code, which should be problem at your > end. > > [1] > > https://demo-trunk.ofbiz.apache.org/webtools/control/setSyncServiceParameters?SERVICE_NAME=getPartyEmail&POOL_NAME=pool&_RUN_SYNC_=Y > > Follow the link and provide partyId as Pawan66 you shared, you will get the > service result. Usually, this kind of error in your own code can be rectify > by logging into the code. > > Regards, > -- > Rishi Solanki > Sr Manager, Enterprise Software Development > HotWax Systems Pvt. Ltd. > Direct: +91-9893287847iu > http://www.hotwaxsystems.com > www.hotwax.co > > > On Tue, Oct 16, 2018 at 6:19 PM Madhi Krishnan < > madhi.krish...@udyogmandir.in> wrote: > > > Hey Rishi.. > > Here the partyId is Pawan66... > > > > The PartyContactMech definitation :- > > <?xml version="1.0" encoding="UTF-8"?><entity-engine-xml> > > <PartyContactMech allowSolicitation="Y" contactMechId="10080" > > createdStamp="2018-10-16 16:58:00.38" createdTxStamp="2018-10-16 > > 16:57:59.935" fromDate="2018-10-16 16:58:00.379" > > lastUpdatedStamp="2018-10-16 16:58:00.38" lastUpdatedTxStamp="2018-10-16 > > 16:57:59.935" partyId="Pawan66"/> </entity-engine-xml> > > > > ContactMech : - > > <?xml version="1.0" encoding="UTF-8"?><entity-engine-xml> > <ContactMech > > contactMechId="10080" contactMechTypeId="EMAIL_ADDRESS" > > createdStamp="2018-10-16 16:58:00.259" createdTxStamp="2018-10-16 > > 16:57:59.935" infoString="primaryem...@gmail.com" > > lastUpdatedStamp="2018-10-16 16:58:00.259" lastUpdatedTxStamp="2018-10-16 > > 16:57:59.935"/> </entity-engine-xml> > > > > PartyContactMechPurpose : - > > <?xml version="1.0" encoding="UTF-8"?><entity-engine-xml> > > <PartyContactMechPurpose contactMechId="10080" > > contactMechPurposeTypeId="PRIMARY_EMAIL" createdStamp="2018-10-16 > > 16:58:06.382" createdTxStamp="2018-10-16 16:58:06.373" > fromDate="2018-10-16 > > 16:58:06.382" lastUpdatedStamp="2018-10-16 16:58:06.382" > > lastUpdatedTxStamp="2018-10-16 16:58:06.373" partyId="Pawan66"/> > > </entity-engine-xml> > > > > On Tue, Oct 16, 2018 at 6:00 PM Rishi Solanki <rishisolan...@gmail.com> > > wrote: > > > > > Hi Madhi, > > > Ideally it should work, can you please review the data you have > prepared. > > > For better understanding, please share the ContactMech, > PartyContactMech > > > and PartyContactMechPurpose xml data you have prepared to run your > > service > > > and not getting the value. > > > > > > You can get that data from webtools, by direct browse to those records > at > > > bottom. > > > > > > -- > > > Rishi Solanki > > > Sr Manager, Enterprise Software Development > > > HotWax Systems Pvt. Ltd. > > > Direct: +91-9893287847 > > > http://www.hotwaxsystems.com > > > www.hotwax.co > > > > > > > > > On Tue, Oct 16, 2018 at 5:38 PM Madhi Krishnan < > > > madhi.krish...@udyogmandir.in> wrote: > > > > > > > Hello pritam.. > > > > I have already created the contactMech record with ContactMechTypeId > > as > > > > "EMAIL_ADDRESS" and associated it with a party... > > > > and also tried by adding the contactMechPurpose Date...but its still > > > > returning a null value.. > > > > > > > > > > > > On Tue, Oct 16, 2018 at 5:05 PM Pritam Kute < > > > pritam.k...@hotwaxsystems.com > > > > > > > > > wrote: > > > > > > > > > Hello Madhi Krishnan, > > > > > > > > > > In addition to the reply from Aditya, if you don't want to add the > > > > > ContactMechPurpose data, you just need to create the ContactMech > > record > > > > > with ContactMechTypeId "EMAIL_ADDRESS" or "ELECTRONIC_ADDRESS" and > > > > > associate it with the party using PartyContactMech entity. > > > > > > > > > > Thanks and Regards > > > > > -- > > > > > Pritam Kute > > > > > > > > > > > > > > > On Tue, Oct 16, 2018 at 4:56 PM Madhi Krishnan < > > > > > madhi.krish...@udyogmandir.in> wrote: > > > > > > > > > > > Hey Aditiya.. > > > > > > Thanks for the reply.. > > > > > > No there is no record for party id 10035 > > > > > > > > > > > > On Tue, Oct 16, 2018 at 4:34 PM Aditya Sharma < > > > > > > aditya.sha...@hotwaxsystems.com> wrote: > > > > > > > > > > > > > Hi Madhi Krishnan, > > > > > > > > > > > > > > Can you find records in PartyContactWithPurpose entity using > > > webtools > > > > > > > with contactMechPurposeTypeId as PRIMARY_EMAIL and partyId as > > > 10035? > > > > > > > > > > > > > > Thanks and Regards, > > > > > > > > > > > > > > *Aditya Sharma* | Enterprise Software Engineer > > > > > > > HotWax Commerce <http://www.hotwax.co/> by HotWax Systems > > > > > > > <http://www.hotwaxsystems.com/> > > > > > > > [image: https://www.linkedin.com/in/aditya-p-sharma/] > > > > > > > <https://www.linkedin.com/in/aditya-p-sharma/> > > > > > > > > > > > > > > > > > > > > > On Tue, Oct 16, 2018 at 3:36 PM Madhi Krishnan < > > > > > > > madhi.krish...@udyogmandir.in> wrote: > > > > > > > > > > > > > > > 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.. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >