on 05-22-2013 7:40 AM
HI All.
I am trying to fetch data on the basis of primary key using sup hybrid.
Steps done:
1: created MBO
2: Deployed application on the server
3: Generated Hybrid app api
4: created a html file where i tried to get the data from back-end on the basis of primary key
function deleteDepartment() {
var dep = new Department();
dep.dept_id="2";
department_findByPrimaryKey( dep, "" , function(error)
{alert(error)});
}
Method 1:
hwc.processDataMessage = function
processDataMessage(incomingWorkflowMessage, noUI, loading,
fromActivationFlow, dataType) {
alert(incomingWorkflowMessage);
}
Method 2:
hwc.processDataMessage = function
(incomingWorkflowMessage) {
alert(incomingWorkflowMessage);
}
I tried to use both the method(method 1 and method 2), but control is not going to any of the methods.
Please help..
Also if anyone have sample for sup hybrid app using generated hybrid app api. please provide.
Thanks
Have you defined the hwc "namespace"? If so, how? If not, try doing it as follows:
hwc = (typeof hwc === "undefined" || !hwc) ? {} : hwc; // SUP 'namespace'
before you declare the processDataMessage function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ankit Garg wrote:
[...] if anyone have sample for sup hybrid app using generated hybrid app api. please provide.
This sample uses the same MBO and same object query you are attempting to use, so it should be perfect for your purposes:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankit,
First thing I would like to know is which version of SUP are you using?
And second thing which I want to put in consideration is: findBy... is an Object Query. It will not hit the back end and get you the data. In case of a HWC it has to be some kind of Online Request.
Regards,
Dharmaraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.