Unable to update Parent of an Organisation by BUI Workspace Extension
Summary
Unable to update Parent of an Organisation by BUI Workspace ExtensionContent
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: 19DCode 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); }); }); });
Tagged:
0