Home > Default > BCS passing dynamic inputs to methods & calling using in O365

BCS passing dynamic inputs to methods & calling using in O365

November 30Hits:0
Advertisement
Hi all ,
I have a requirement to pass dynamic values to BDC methods & retrieve data, for this I have created a BDC model file(which has SQL server as external source) with GenericInvoker methods & upload same to Admin central. how do we access these generic
methods in Office 365 using JavaScript client object model.
what are the options we have to invoke methods manually by passing dynamic values.
I tried below code. but I getting below error.
The web with URL 'http://XXXXXXXX:26110/sites/RA5' is not an app web. The GetAppBdcCatalog method must be called on an app web.
Any help on this would be appreciated
function retrieveListItems() {
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
context = SP.ClientContext.get_current();
web = context.get_web();
context.load(web);
entity = web.getAppBdcCatalog().getEntity("PersonalDetails", "New external content type");
context.load(entity);
lob = entity.getLobSystem();
context.load(lob);
lobSystemInstances = lob.getLobSystemInstances();
context.load(lobSystemInstances);
context.executeQueryAsync(GetLobSubscribesystemInstance, onQueryFailed);
function Entity() {
alert("Reached the Entity method");
//these are the helper methods and variables
var context;
var web;
var user;
var entity;
var lob;
var lobSystemInstance;
var lobSystemInstances;
// Initialize the LobSystemInstance.
function GetLobSubscribesystemInstance() {
var $$enum_1_0 = lobSystemInstances.getEnumerator();
while ($$enum_1_0.moveNext()) {
var instance = $$enum_1_0.get_current();
lobSystemInstance = instance;
context.load(lobSystemInstance);
break;
context.executeQueryAsync(Entity, onQueryFailed);
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
ragava_28

Answers

Hi all ,
I have a requirement to pass dynamic values to BDC methods & retrieve data, for this I have created a BDC model file(which has SQL server as external source) with GenericInvoker methods & upload same to Admin central. how do we access these generic
methods in Office 365 using JavaScript client object model.
what are the options we have to invoke methods manually by passing dynamic values.
I tried below code. but I getting below error.
The web with URL 'http://XXXXXXXX:26110/sites/RA5' is not an app web. The GetAppBdcCatalog method must be called on an app web.
Any help on this would be appreciated
function retrieveListItems() {
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
context = SP.ClientContext.get_current();
web = context.get_web();
context.load(web);
entity = web.getAppBdcCatalog().getEntity("PersonalDetails", "New external content type");
context.load(entity);
lob = entity.getLobSystem();
context.load(lob);
lobSystemInstances = lob.getLobSystemInstances();
context.load(lobSystemInstances);
context.executeQueryAsync(GetLobSubscribesystemInstance, onQueryFailed);
function Entity() {
alert("Reached the Entity method");
//these are the helper methods and variables
var context;
var web;
var user;
var entity;
var lob;
var lobSystemInstance;
var lobSystemInstances;
// Initialize the LobSystemInstance.
function GetLobSubscribesystemInstance() {
var $$enum_1_0 = lobSystemInstances.getEnumerator();
while ($$enum_1_0.moveNext()) {
var instance = $$enum_1_0.get_current();
lobSystemInstance = instance;
context.load(lobSystemInstance);
break;
context.executeQueryAsync(Entity, onQueryFailed);
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
ragava_28

Read other 7 answers

Tags:

Related Articles

  • BCS passing dynamic inputs to methods & calling using in O365November 30

    Hi all , I have a requirement to pass dynamic values to BDC methods & retrieve data, for this I have created a BDC model file(which has SQL server as external source) with GenericInvoker methods & upload same to Admin central. how do we access the

  • Can we pass runtime input varibles to Actives X componetsNovember 30

    Hi,      Can we pass the runtime input variables to Active X componets, so the output can be varied depending upon the inpur variable we pass. The main idea is : I am using Active X compnets to inteface with C code and Excel sheet where we have to pa

  • Passing dynamic parameter to stored procedure from CR formula?November 30

    Dear all, I need to insert in some textboxes the right string based on the desired Language Code. I crated a stored procedure in my db. CREATE PROCEDURE MY_GET_TRANSLATION      @TextID nvarchar(8),      @LangCode int This parameters are used as keys

  • Passing output to a method, I'm lost!November 30

    I want to put all of my "output" including the returns on the three Temp functions in my method DisplayTemperatures, but I'm stuck and don't know how to do this. Please help import javax.swing.*; import java.text.DecimalFormat; public class Temp

  • How to Pass Dynamic values to XML in flexNovember 30

    Hi, i just want to pass dynamic values. it must be stored in XML List or XML .for Ex: In my App i want to pass Edu_Institute,From_date,To_Date,Qualification fileds to Education table. I have used Webservices to connect with the Backend. At that time

  • Pass dynamic Command line argumentsNovember 30

    Hi, I tried to pass dynamic command line argument to Web start using the method : "javaws URL -D foo -D bar" as explained in the "Unofficial JWS/JNLP FAQ" that " You can pass your own system properties to your app using -D switch

  • How to pass Dynamic Table(s) to FMNovember 30

    Hello All i hv an requirement in which i need to process a block of code recursively. right now i am trying to do the same with Subroutine but its hard i know. I have an option to use FM instead but i am not sure if we can pass dynamic tables to FM,

  • Concatenating VARCHAR2 to pass to a Java methodNovember 30

    Hi, I've imported in Oracle 10g a Java method which processes a String. I've mapped the String to a varchar2 as follow: create or replace function PARSE(input in varchar2) RETURN varchar2 as language java name 'Base64.decodeToString(java.lang.String)

  • Pass parameter to success method of ExecuteQueryAsyncNovember 30

    I have seen how to pass a parameter to a callback method of the ExecuteQueryAsync SP.ClientContext object.  The problem occurs when multiple calls are performed.  The last value is always passed to the callback method.  Below is a sample of a while l

  • Passing dynamic System property to applicaitonNovember 30

    Is it possible to pass dynamic system property from the command line to the application in javawebstart. So that my application can get it using System.getProperty() method. Thanks in Advance, SaranganHi, Thanks. But its not possible for us to move t

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 1.231 s.