Question
Telstra
IN
Last activity: 13 Apr 2017 9:36 EDT
Using the Hybrid Client API within a Pega application is not Working
Hi GCS, I am working on the tutorial given inthe link https://pdn.pega.com/tutorial-using-hybrid-client-api-within-pega-application, but I am not able to achieve the output in the mobile though I have done and followed same steps.could you please help me on this if any additional configuration is to be done.The functions in the script are not getting called.Please help on this
***Updated by moderator: Lochan to add Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
PL
Hello, Just to make sure we're on the same page - do you test your application in Hybrid Container or in a mobile browser?
Telstra
IN
Hi Jarek , I checked the application in Pega7 app downloaded from Google Play Store ,not in mobile browser.
Pegasystems Inc.
PL
Hi pradeep koutha - could you please give us more details ? Could you please point me to application you created (and doesn't work) ? Are you using HC downloaded from application Mobile Tab, or Pega7 from App Store/Google Play ?
Telstra
IN
Hi Michal ,
I have implemented the same by following the tutorial
Tutorial: Using the Hybrid Client API within a Pega application
from the link
https://pdn.pega.com/tutorial-using-hybrid-client-api-within-pega-application
Here I created the perform harness with textinput to enter the name.
And the button FINDCONTACT which runs a script on button click.
This JS Contacts_api_example has the function contacts_api which is called on the button click.
But the function is getting called
and findCallbacks is not getting called.
Pegasystems Inc.
PL
Could you please grant me access to your application (user with admin role would be preferred).
Which version of PRPC ?
What OS are you using (Android or iOS) - what version ?
Telstra
IN
Hi Michal ,
I am not able to grant you access,for this.(I tried to build again in pega cloud but failed to create JS)
Have you tested this tutorial implementation?
If so is the application fetching contacts results from our own mobile phone ? (how the code is getting data from mobile sim data ? )
Android I have used 4.4.2
and pega version is 7.1.9
Updated: 5 Feb 2016 11:13 EST
Pegasystems Inc.
PL
Yes, I followed the tutorial, and it works for me, although I used Pega7 7.2 on Android 5.0.
Please note that there were some changes in the tutorial - you may now copy javascript snippet and paste it into your Designer Studio - it should reduce possibility of typo.
Also - I noticed minor mistakes in javascript snippet which have been fixed today.
So could you please try copying js snippet to your application and try again.
Note, that this tutorial doesn't work for offline enabled cases.
PS For more detailed documentation regarding Contacts API see https://community.pega.com/sites/default/files/mobileclient/6200/api/client_api/container_object_contacts.html#
Pegasystems Inc.
PL
pradeep koutha Did you manage to use HC API in your PRPC application ? Do you need any more assistance ?
Telstra
IN
I will redo and update..Thanks a lot
Telstra
IN
hi Michal , Now I copied the js from that tutorial . But here when we run the case.
We have
1.Enter Name Field where I enter name.
2.Find Contacts button , on this click function contacts_api(name) is getting called.
3.We have results and I have given DATAFIELD control and here we need to give the property name?
Pegasystems Inc.
PL
Telstra
IN
I had used .ContactRsults now , but not able to get the result . In the Script they used
var results = document.getElementById("ContactsResults");
Exactly what this code do ? It takes textarea property name ?
Pegasystems Inc.
PL
document.getElementById() is a standard javascript method which looks for DOM element with given id, and PRPC generates ids for controls (textarea in this case) using name of property it is bound to (here: ContactsResults). I think it would be easier to work on a common Pega7 instance - do you have access to instance in cloud ?
Telstra
IN
Can I have access to the pega instance which you had used ? If not I will try to build the same tutorial in any common pega cloud instance .
Pegasystems Inc.
PL
My Pega7 instance is visible inside Pega VPN only, so it would be better if you go with cloud instance.