这是indexloc提供的服务,不要输入任何密码
Skip to content

Get sandbox name for orgs without custom URL #3

@benburwell

Description

@benburwell

The following JS can be used in sandboxes:

fetch('/changemgmt/listOutboundChangeSet.apexp', {
  credentials: 'same-origin'
}).then(function(response) {
  return response.text();
}).then(function(text) {
  var p = new DOMParser();
  var d = p.parseFromString(text, 'text/html');
  var thisOrgEl = d.getElementById('thisOrg');
  var sandboxName = thisOrgEl.children[0].innerText.split('\n')[0];
});

Need to test this out in a production org

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