What's new in Customer Journeys?

Connect and learn more! ×
Unable to update Parent of an Organisation by BUI Workspace Extension — Cloud Customer Connect
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
48
Views
6
Comments
edited Jun 13, 2022 4:13AM in General Technical Discussions 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!