Visual Builder

Get Involved. Join the Conversation.

Posts

  • Syed Wamiq Iqbal
    Getting error while querying Custom Object fields using Rest...5
    Topic posted Yesterday by Syed Wamiq Iqbal, tagged Business Objects, Database, REST 
    Title:
    Getting error while querying Custom Object fields using Rest API
    Summary:
    Getting error while querying Custom Object fields using Rest API
    Content:

    I am trying to query an attribute by using dynamic URL parameter as shown in the link below,

    https://cloudcustomerconnect.oracle.com/posts/53769d8407?commentId=230235#230235

    but I get this error: 

    {
        "type": "HTTP://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
        "status": 400,
        "title": "Bad Request",
        "detail": "The attribute(s) [OrderNumber_c] are not queriable."
    }

    Version:
    11.13.18.05
    Image:
  • Kashyap Raghavendra
    List of Values in Visual Builder Excel Plug in6
    Topic posted December 6, 2019 by Kashyap RaghavendraRed Ribbon: 250+ Points, tagged Business Objects, REST 
    Title:
    List of Values in Visual Builder Excel Plug in
    Summary:
    Setting filter in List of Value object based on the Excel cell value or by the referenced field name of the business object
    Content:

    Hi,

    Can the filter for the List of Values  of a field be set based on the value of an other field in the  in the table . 

    e.g. q=ID = $D2.Value to get value of D2 column in excel or by the  referenced column of the business object .

     

    Thanks and regards

    Kashyap

     

     

     

  • Stiven Oliveira Bezerra
    Offline Post VBCS with Business Object115.0
    Topic posted November 25, 2019 by Stiven Oliveira BezerraBlue Ribbon: 750+ Points, tagged Business Objects, JET, Mobile, REST 
    Title:
    Offline Post VBCS with Business Object
    Content:

    Hi i need to do a Get and Post with offline service, i follow some steps for this post here, https://blogs.oracle.com/shay/adding-offline-capabilities-to-an-oracle-visual-builder-app. But my Post doesn't work, and i'm try to do this for Mobile VBCS. This my code: 

    define([
        'vbsw/helpers/serviceWorkerHelpers',
        'persist/persistenceManager',
        'persist/defaultResponseProxy',
        'persist/persistenceUtils',
        'persist/fetchStrategies',
        'persist/impl/logger'
      ],
      function(ServiceWorkerHelpers, PersistenceManager, DefaultResponseProxy,
        PersistenceUtils, FetchStrategies, Logger) {
        'use strict';

        function AppModule() {}

        function OfflineHandler() {

          Logger.option('level', Logger.LEVEL_LOG);
          Logger.option('writer', console);

          var options = {

            requestHandlerOverride: {
              handlePost: handlePost
            },
            fetchStrategy: FetchStrategies.getCacheIfOfflineStrategy({
              backgroundFetch: 'disabled'
            })
          };
          this._responseProxy = DefaultResponseProxy.getResponseProxy(options);
        }

        OfflineHandler.prototype.handleRequest = function(request, scope) {

          console.log('OfflineHandler.handleRequest() url = ' + request.url +
            ' cache = ' + request.cache +
            ' mode = ' + request.mode);

          if (request.url.match(
              'https://devpoc-timtoa.integration.ocp.oraclecloud.com:443/ic/builder/design/yb/1.2.1/resources/data/ServiceOrderLineReview'
            )) {

            return this._responseProxy.processRequest(request);
          }
          return PersistenceManager.browserFetch(request);
        };

        OfflineHandler.prototype.beforeSyncRequestListener = function(event) {
          return Promise.resolve();
        };
        OfflineHandler.prototype.afterSyncRequestListener = function(event) {
          return Promise.resolve();
        };
        AppModule.prototype.createOfflineHandler = function() {
          return Promise.resolve(new OfflineHandler());
        };
        AppModule.prototype.isOnline = function() {
          return ServiceWorkerHelpers.isOnline();
        };
        AppModule.prototype.forceOffline = function(flag) {
          return ServiceWorkerHelpers.forceOffline(flag).then(function() {
        
            if (!flag) {
              return ServiceWorkerHelpers.syncOfflineData();
            }
            return Promise.resolve();

          }).catch(function(error) {
            console.error(error);
          });
        };
        AppModule.prototype.dataSynch = function() {
          return ServiceWorkerHelpers.syncOfflineData();
        };

        // custom implementation to handle the POST request
        var handlePost = function(request) {
          if (ServiceWorkerHelpers.isOnline()) {}

          return PersistenceUtils.requestToJSON(request).then(function(
            requestData) {
            console.log('Inside PersistenceUtils');
            console.log(requestData);
            requestData.status = 202;
            requestData.statusText = 'OK';
            requestData.headers['content-type'] = 'application/json';
            requestData.headers['x-oracle-jscpt-cache-expiration-date'] =
              '';

            // if the request contains an ETag then we have to generate a new one
            var ifMatch = requestData.headers['if-match'];
            var ifNoneMatch = requestData.headers['if-none-match'];

            if (ifMatch || ifNoneMatch) {
              var randomInt = Math.floor(Math.random() * 1000000);
              requestData.headers['etag'] = (Date.now() + randomInt).toString();
              requestData.headers['x-oracle-jscpt-etag-generated'] =
                requestData.headers['etag'];
              delete requestData.headers['if-match'];
              delete requestData.headers['if-none-match'];
            }
            return PersistenceUtils.responseFromJSON(requestData);
          });
        };

        AppModule.prototype.hideSpinner = function() {
          // tear down the spinner screen
          var spinner = document.getElementById('vb-spinner');
          if (spinner) {
            // if the spinner screen is not yet displayed, immediately remove it and return
            var computedStyle = window.getComputedStyle(spinner);
            var opacity = parseInt(computedStyle.getPropertyValue('opacity'),
              10);
            if (opacity < 0.1) {
              spinner.parentNode.removeChild(spinner);
              return;
            }

            var transEndFn = function() {
              if (spinner.parentNode) {
                spinner.parentNode.removeChild(spinner);
              }
              spinner.removeEventListener('transitionend', transEndFn);
            };
            spinner.addEventListener('transitionend', transEndFn, false);
            spinner.className += ' vb-spinner-reveal-trans';
          }
        };

        return AppModule;
      });

     

    Have something wrong? I need more things to work in Mobile? I'm using the Business Object.

  • eswar prasad
    Business Object data is not getting persisted when we commit...1
    Topic posted November 21, 2019 by eswar prasadRed Ribbon: 250+ Points, tagged Business Objects 
    Title:
    Business Object data is not getting persisted when we commit code to GIT repo
    Summary:
    Business Object data is not getting persisted when we commit code to GIT repo
    Content:

    I created a Business object in VBCS and loaded some data and its running fine in preview mode.

    But when we try to commit the code into GIT repo and again when i try to take a fresh import or pull from GIT repo, the Business Object is there but the data is not getting persisted and tableis blank.

    Could you please let us know what configuration changes we need to make so that the data is persisted after commiting code to GIT repo.

     

    Version:
    19.3.1.4
  • vijay.kekane
    VBCS BO REST endpoint with query (q) for multiple...Answered2
    Topic posted November 20, 2019 by vijay.kekane Red Ribbon: 250+ Points, tagged Business Objects, REST 
    Title:
    VBCS BO REST endpoint with query (q) for multiple fields
    Summary:
    REST end point give error (400 bad request) for multiple fields
    Content:

    Hi There,

    I created BO in VBCS with multiple fields. We need to query this BO, then based on return perform insert (post) or update (patch). I need to check data based on two fields. So I am using REST endpoint getAll for BO with query (q) parameter. My problem is REST call for 2 fields give error. Here is syntax of my call

    https://<domain>/ic/builder/design/<VBCS app name>/1.0.1/resources/data/GLCOASegmentValues?q=lookupValue='1000000';lookupName='Account HS'

    which give 400 bad request error.

    For more information, both fields have searchable checked. Above call work with 1 field (either lookupValue or lookupName) but, not for both. I check syntax for REST endpoint for 2 columns and they are separated by semi colon (;), used above. It work for REST endpoint from SaaS (financial cloud). Do I need to use any different syntax or any change in BO, fields definition?

    I am performing REST endpoint testing in Postman.

    Thanks,

    Vijay

    Version:
    19.3.1.2
  • Andy May-Coates
    How to handle multiple nested collections in Visual Builder...Answered135.0
    Topic posted November 18, 2019 by Andy May-CoatesBronze Trophy: 5,000+ Points, tagged Business Objects, Layout, REST 
    Title:
    How to handle multiple nested collections in Visual Builder add-in for Excel
    Summary:
    How to handle multiple nested collections in Visual Builder add-in for Excel
    Content:

    In the Oracle Visual Builder add-in for Excel, a form-over-table layout can be used to support parent-child business object relationships e.g. supplier and supplier site.

    However, we have a REST API where there are multiple nested child collections, and properties need to be supplied at each level to be of any use. For example:-

    https://***.oraclecloud.com/fscmRestApi/resources/11.13.18.05/financialProjectPlans

    This has several nested levels of child collections, and properties from each level need to be included to bulk update a financial project plan resource assignment. For example:-

    Project level detail would come from the top level "financialProjectPlans"
    Task and resource detail would come from the next level "ResourceAssignments"
    Currency and plan amount totals come from the next level "PlanningAmounts"
    Periodic plan amounts come from the lowest level "PlanAmountDetail"

    What we really need is a table layout containing properties from all four levels above, where parent properties would simply fill down/duplicate.

    On a related note, when we import the swagger for the above service, the plugin only shows the top three levels (see image below). This seems to be the case for other REST APIs. Is this a product limitation? Is there any workaround to this either?

    Any help greatly appreciated.

    Version:
    Oracle Visual Builder Add-in for Excel 2.0.0.20643
    Image:
    Document:
  • Stephen Bryant
    Field Level Update Trigger updates field only onceAnswered6
    Topic posted November 15, 2019 by Stephen BryantBronze Trophy: 5,000+ Points, tagged Business Objects, Custom Code, Groovy 
    Title:
    Field Level Update Trigger updates field only once
    Summary:
    Field Level Update Trigger on BO only updates field when record is created
    Content:

    Hello,

    I have a very simple trigger in one BO that executes always.  When a field is updated (treasurySymbol), I grab another field from a related BO (attributeOne).

    This works fine when the record is created but updates do not work.

    It is an update trigger so I am a little confused here.  When I change the treasurySymbol field, the attribute1 field does not change.

    Here is the simple code generated:

    // Field Trigger Beginning 
    println 'Field Trigger started: testUpdateTrigger, business object: fvBeTrxHdrs, field: treasurySymbol';

    try {

      // Always Execute Criterion (Always Execute)
      alwaysExecuteCriterion_1: {
        // Action Group (Action Group)
        test = {
        treasurySymbolObject.attributeOne
        }.call();

      }

    } finally {

      // Field Trigger End 
      println 'Field Trigger ended: testUpdateTrigger';

    }

    Am I missing anything?  I've tried setAttribute, isAttributeChanged without success.

     

    Thank you,

    Steve

    Version:
    19.3.1.2
  • Deep Mandal
    Oracle VBCS Role Based Mail SendAnswered65.0
    Topic posted November 14, 2019 by Deep MandalGreen Ribbon: 100+ Points, tagged Action Flows, Business Objects, Custom Code, Groovy 
    Title:
    Oracle VBCS Role Based Mail Send
    Summary:
    Oracle VBCS Role Based Mail Send
    Content:

    In Oracle VBCS how can we send mail to the Users attached to particular VBCS Role.

    For Example:

    Suppose I have two Roles Creator and Approver. So, when users having "Creator" Role creates some record in VBCS BO then I want to send mail to the users having "Approver" role. How this business scenario can be achieved.

    Version:
    19.3.1.2
  • Stephen Bryant
    Business Object Function - return array with multiple...2
    Topic posted November 13, 2019 by Stephen BryantBronze Trophy: 5,000+ Points, tagged Action Flows, Business Objects, Custom Code, Groovy, REST, SaaS Integration 
    Title:
    Business Object Function - return array with multiple records
    Summary:
    Business Object Function - return array with multiple records to pass to web service
    Content:

    Hello,

    I have BO called, TrxHdrs, with multiple records.  I know I can create a BO Object Function to iterate over those records.

    What I would like to do is write records that, for example, have a Status of, "available", to an array.  I want to write the entire record where the criterion is met.  Then I would like to pass the result (with multiple rows) to a web service (integration cloud) that sends it to ERP Cloud.  The only thing I need help with is how to create an array with multiple records in groovy.  The array will be structured to match what is expected by the web service.

    I am thinking each record would be a list with key-value pairs and many records would be contained within a "parent array". That would be the result to pass to the web service.

    In VBCS, I am able to iterate over and ADP and pass a single result to the web service successfully.  I am looking to do the same thing but get the data from the BO. 

    Any help is appreciated.

    Steve    

    Version:
    19.3.1.2
  • vijay.kekane
    Select One LOV in edit page2
    Topic posted November 12, 2019 by vijay.kekane Red Ribbon: 250+ Points, tagged Business Objects 
    Title:
    Select One LOV in edit page
    Summary:
    Select One field does not populate value in edit page
    Content:

    Added HTML of edit page.

    Hi There,

    I followed simple steps in apps related to select one field, which shows LOV based on local VBCS BO,

    1) Create BO in VBCS (customers) and populate it with data.

    2) Create Save page. It save data into another VBCS BO (SubsidiaryLedger). Save page has Select(One) type field called customerNumber. It shows lov based on customers BO. LOV shows expected values and populate VBCS BO field (customerNumber) in SubsidiaryLedger successfully.

    3) Edit page is created to edit records created above. This page also has Select(One) type field and shows lov based on customers BO.My problem is when edit page is loaded, it does not show value in customerNumber field.

    I have main page which list all records and navigate to create or edit. I can navigate to edit page from main page after selecting record (standard functionality). I can see this value in Input Text type field but, not in Select(One) on edit page.

    Not sure if q parameter is solution but, I tried to use it in customersListSDP (used for LOV) page level variable but, it does not work.

    Any idea how to make it show value in edit page using Select(One) type field?

    Thanks,

    Vijay

    Version:
    19.3.1.2
    Document: