You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Unable to update Parent of an Organisation by BUI Workspace Extension

Received Response
14
Views
6
Comments
edited Feb 4, 2021 11:50AM in UI Extensibility 6 comments

Summary

Unable to update Parent of an Organisation by BUI Workspace Extension

Content

Hi All,

I am trying to set the Parent of an organisation by BUI Extension. There is a requirement where we have to show a drop down to select the org and set it as parent of the current open org.

For this i am using the BUI Extensibility framework. And below is my code attached

Can anybody suggest anything about this? 

Version

BUI Version: 3.21.01.22-b0002 and Site Version: 19D

Code Snippet

var myAppId = 'orgHierarchy'; // Application ID
    var extensibilityApiVersion = '1.0.0';
ORACLE_SERVICE_CLOUD.extension_loader.load(myAppId, extensibilityApiVersion)
    .then(function(extensionProvider)
    {
extensionProvider.registerWorkspaceExtension(function(workspaceRecord)
      {

      workspaceRecord.getFieldValues(['Org.Parent.Id']).then(function(IFieldDetails)
{
var field_val1 = IFieldDetails.getField('Org.Parent.Id').getLabel();
      console.log("Parent: ",field_val1);
      workspaceRecord.updateFieldByLabel('Org.Parent.Id',24690);
      workspaceRecord.executeEditorCommand('Save');
      field_val1 = IFieldDetails.getField('Org.Parent.Id').getLabel();
      console.log("Parent updated: ",field_val1);
});
      });
});

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!