You need to sign in to do that
Don't have an account?
VRK
How to pass contact lookup filed value..
Hi folks,
can someone help on how to pass contact Lookup filed value through webservicies......
i can able to pass all the values except Lookup field contact value based on personal number .
can some one please check and let me know how can i pass lookup field value based on personal number .....Thanks
please see below code and result screenshot...
global class IVRObjWebservice
{
webservice static Id createIVRRecord(String CallerID, String ContactChannel,String ContactIntent,String AuthenticationResult,
String AutomatedTaskCompleted,String dob,String DNIS,String enddate,
String LanguagePreference,String SeqMemberID,String SSN,String startdate,
String subscriberId,String SubscriberPlanID,String SubscriberType,String SurveyOption,
String TransferedTo,String ccChannelDuration,String ivrjourney)
{
IVR_Journey__c con = new IVR_Journey__c();
con.Caller_ID__c = Integer.valueOf(CallerID);
con.Seq_Member_ID__c = Integer.valueOf(SeqMemberID);
con.DNIS__c = Integer.valueOf(DNIS);
con.Start_Date_Time__c = Datetime.valueOf(startdate);
con.End_Date_Time__c = Datetime.valueOf(enddate);
con.Contact_Channel__c = ContactChannel;
con.Contact_Channel_Duration__c = ccChannelDuration;
Contact contact = new Contact (Id = con.Ivr_Journey__c); ( i think this line code is wrong)
insert con;
return con.id;
}
}
i created correctly lookup relation ship between contact and custom object(IVR_journey_c) .....
can someone help on how to pass contact Lookup filed value through webservicies......
i can able to pass all the values except Lookup field contact value based on personal number .
can some one please check and let me know how can i pass lookup field value based on personal number .....Thanks
please see below code and result screenshot...
global class IVRObjWebservice
{
webservice static Id createIVRRecord(String CallerID, String ContactChannel,String ContactIntent,String AuthenticationResult,
String AutomatedTaskCompleted,String dob,String DNIS,String enddate,
String LanguagePreference,String SeqMemberID,String SSN,String startdate,
String subscriberId,String SubscriberPlanID,String SubscriberType,String SurveyOption,
String TransferedTo,String ccChannelDuration,String ivrjourney)
{
IVR_Journey__c con = new IVR_Journey__c();
con.Caller_ID__c = Integer.valueOf(CallerID);
con.Seq_Member_ID__c = Integer.valueOf(SeqMemberID);
con.DNIS__c = Integer.valueOf(DNIS);
con.Start_Date_Time__c = Datetime.valueOf(startdate);
con.End_Date_Time__c = Datetime.valueOf(enddate);
con.Contact_Channel__c = ContactChannel;
con.Contact_Channel_Duration__c = ccChannelDuration;
Contact contact = new Contact (Id = con.Ivr_Journey__c); ( i think this line code is wrong)
insert con;
return con.id;
}
}
i created correctly lookup relation ship between contact and custom object(IVR_journey_c) .....
Test1 contact only neds to send its Id as parameter list not the full contact.
Then you need to assign that ID to the Contact Id parameter to con.Ivr_Journey__c. Here is what I mean:
Let me know if this makes sense. Thanks
All Answers
If I understood your question correctly you can pass the contact look up ID field value to the webservice as:
You need to point that Contact ID field of IVR_Journey__c to an existing Contact Id. So now you have:
Is this what you meant to do?
Thanks for your response...
i will explain my question clearly .............
in contact object , i have contacts like 'test1','test2','test3, test4'.........................
i created custom object 'IVR-Jorney_c' and cretae lookup relationship between contact and IVR_Journey_c object.
Now,, third party sending custom object details along with test1 contact .... i can able to save custom object details but not contact 'Test1'.
i hope you can clear now ....pls check the code and let me know how can pass Test1 contact ? Thanks
Test1 contact only neds to send its Id as parameter list not the full contact.
Then you need to assign that ID to the Contact Id parameter to con.Ivr_Journey__c. Here is what I mean:
Let me know if this makes sense. Thanks