Skip to content

[REQUEST]: Add 'Edit Table' command #449

@AdamEldred

Description

@AdamEldred

Prerequisites

  • I have searched the existing issues and found no duplicates

Issue Type

Feature Request

Description

It would be helpful to have a button to directly open the Power Apps table editor from a given record. This is useful when relationships/keys/etc need to be adjusted. I have added a custom button for this, but would prefer a native one that is visible in the popup instead of sidebar only. I have included my button JS below (not an expert, there may be a better script).

Steps to Reproduce (for bugs)

var X = window.Xrm || parent.Xrm || top.Xrm;

var entityName = X.Page.data.entity.getEntityName();

var orgSettings = X.Utility.getGlobalContext().organizationSettings;
var environmentId = orgSettings.bapEnvironmentId || orgSettings.environmentId;

if (!environmentId) {
  alert("Could not read Environment ID from this client context.");
  return;
}

var clientUrl = X.Utility.getGlobalContext().getClientUrl();

// Use %27 instead of literal single quotes in the OData filter
var url =
  clientUrl +
  "/api/data/v9.2/EntityDefinitions?$select=MetadataId&$filter=LogicalName%20eq%20%27" +
  encodeURIComponent(entityName) +
  "%27";

var req = new XMLHttpRequest();
req.open("GET", url, true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");

req.onreadystatechange = function () {
  if (this.readyState !== 4) return;

  if (this.status >= 200 && this.status < 300) {
    var data = JSON.parse(this.responseText);

    if (!data.value || !data.value.length) {
      alert("Entity metadata not found.");
      return;
    }

    var entityMetadataId = data.value[0].MetadataId;

    var makerUrl =
      "https://make.powerapps.com/environments/" +
      environmentId +
      "/entities/" +
      entityMetadataId;

    window.open(makerUrl, "_blank");
  } else {
    alert(
      "Metadata query failed: " +
        this.status +
        " " +
        this.statusText +
        "\n" +
        this.responseText
    );
  }
};

req.send();

Expected Behavior

No response

Browser

Edge

Operating System

None

Window Mode

Normal

Form Mode (for form-related issues)

Modern UI

Dynamics 365 / Power Apps Version

No response

Admin Status

None

Deployment Type

Online

App Type

Model Driven App

Entity Name

No response

Additional Context

No response

Screenshots / Recordings

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions