管理应用Managing apps

Share apps with colleagues and others, and control which version of an app is used and shared. Work with containers for apps, connections, and other resources.

你将了解操作方式...

共享应用Share your apps

虽然可以使用 PowerApps 轻松生成可满足你自己的业务需求的应用,但能够与其他人共享这些应用才是它的真正魅力所在。It's great to build apps that address your own business needs, but the real magic of PowerApps comes from sharing those apps with others. 至此,你已经知道如何生成应用,此主题将介绍如何共享应用。Now that you know how to build an app, in this topic you will learn how to share it. 可以与特定的用户或组共享应用,也可以与整个组织共享应用。You can share an app with specific users or groups, or you can share it with your entire organization. 与其他人共享应用后,他们可以在浏览器中使用 Dynamics 365 运行应用,也可以使用适用于 Windows、iOS 或 Android 的 PowerApps Mobile 运行应用。When you share an app with someone, they can run it from Dynamics 365 in a browser or in PowerApps Mobile for Windows, iOS, or Android. 若向某人授予参与者权限,他/她还可以更新应用。If you give someone contributor permissions, they can also update the app.

准备共享应用Prepare to share an app

必须先将应用保存到云中,然后才能与其他人共享。You must save an app to the cloud before you can share it with anyone. 为应用指定一个有意义的名称和提要,让其他人知道这是一个什么应用,并能在列表中快速找到它。Give the app a meaningful name and description, so people know what your app is about and can easily pick it out from a list. 在 PowerApps Studio 中,单击或点击“文件”,然后输入提要。In PowerApps Studio, click or tap File, then enter a description.

应用提要

请注意,你对共享应用做出的任何更改一经保存,便会与共享对象同步。Be aware that any changes you make to a shared app will flow through to the people you shared it with as soon as you save the changes. 如果你改进应用,便会发现这样非常棒;但如果你删除或大幅改动相关功能,也可能会对其他人造成影响。This can be great if you improve the app, but can also impact others if you remove or significantly change features.

共享应用Share an app

访问 web.powerapps.com,依次单击应用磁贴上的省略号 (.In web.powerapps.com, on an app tile, click the ellipsis (. . .) 和“共享”。.), and then click Share.

通过 web.powerapps.com 共享应用

在这里,不仅可以共享应用,还可以控制应用版本(下一主题将对此进行介绍)。From here, you can share an app and also control app versioning, which we'll cover in the next topic. 指定要与之共享应用的用户和组,并指定每个共享对象应具有的角色(用户参与者)。Specify the users and groups to share the app with and what role they should each have - User or Contributor. 单击或点击“保存”。Click or tap Save.

选择用户和组

若选择通过电子邮件通知用户,应用的每个共享对象都会收到包含 Dynamics 365 链接的电子邮件。If you choose to notify users via email, everyone you shared the app with receives an email with a link to Dynamics 365. 应用参与者收到的电子邮件中还包含 web.powerapps.com 链接。如果不单击 Dynamics 365 链接,共享对象就看不到应用。App contributors also receive a link to web.powerapps.com. If someone doesn't follow the link to Dynamics 365, the app will not show up for them there. 虽然应用位于 AppSource 中,但共享对象仍必须自行将其添加到 Dynamics 365 中。It will be in AppSource, but they'll have to add it to Dynamics 365 themselves.

Dynamics 365 中的应用

权限和授权Permissions and licensing

我们不会详细介绍权限和授权,但会介绍一些与共享相关的基础知识:We're not going to get into detail about permissions and licensing, but we want to cover a couple of basics related to sharing:

  • 用户和参与者需要获得对共享应用使用的任何数据连接和网关的访问权限。Users and contributors need permissions to any data connections and gateways that a shared app uses. 虽然应用隐式附带某些权限,但仍必须明确授予其他权限。Some permissions come along implicitly with the app, but others must be explicitly granted.
  • 如果应用使用 Common Data Service 实体,用户和参与者需要获得对 Common Data Service 数据库的访问权限。If the app uses Common Data Service entities, users and contributors need access to the Common Data Service database. 若要直接处理实体,参与者还需要获得 PowerApps "P2" 许可证。Contributors also need a PowerApps "P2" license if they work directly with entities.

共享应用非常简单,可以轻松挑选出你认为有用的应用,以供整个组织的其他用户使用。Sharing apps is easy, and it's a great way to take an app that you find useful and make it available to people across your organization. 下一主题将介绍如何在使用和共享应用时控制有效的应用版本。In the next topic we'll explain how to control which version of an app is active when you use and share the app.

对应用进行版本控制Version your apps

如果遇到问题或保存了本不该执行的应用更改,不可不知的是,PowerApps 可以帮你走出困境。对于保存在云中的应用,PowerApps 保留了你所做更改的历史记录。If something goes wrong or you save a change to an app you shouldn't have, it's good to know that PowerApps can help you out. For apps that are saved in the cloud, PowerApps keeps a history of the changes that you make. 可以查看已保存的版本,并根据需要还原旧版应用。You can view the versions that are saved and restore your app to a previous version if necessary. 请注意,如果应用已共享,共享对象也会收到还原版本。Be aware that if the app is shared, the people you shared with also receive the restored version.

如何对应用进行版本控制How to version an app

访问 web.powerapps.com,依次单击应用磁贴上的省略号 (.In web.powerapps.com, on an app tile, click the ellipsis (. . .) 和“详细信息”。.), and then click Details.

单击“详细信息”查看应用版本

在这里,不仅可以控制应用版本,还能共享应用(上一主题对此进行了介绍)。From here, you can control app versioning and also share an app, which we covered in the previous topic. 若要还原旧版应用,请单击相应版本(在此示例中为版本 3)对应的“还原”,然后再次单击“还原”进行确认。To move back to a previous version of an app, click Restore for the appropriate version (version 3 in the example), and click Restore again to confirm. 如此示例所示,还原到版本 3 后,PowerApps 会此视为新版本(即此示例中的版本 5),而不是仅覆盖版本 4。As you see in the example, after you restore to version 3, PowerApps treats this as a new version (version 5 in the example), rather than just overwriting version 4.

还原旧版应用

如果需要还原旧版应用,便会发现版本控制非常有用。因此,请记得在应用出现任何问题时使用此功能。Versioning can be very helpful if you need to restore a previous version of an app, so keep it in mind if you run into any issues with your apps. 至此,你已了解如何共享应用并根据需要还原应用。我们将继续学习本课程中有关应用管理的最后一个主题,即如何管理环境。Now that know how to share your apps and restore them if necessary, we'll move on to the last aspect of app management in this course - managing environments.

环境Environments

学习本课程到现在,你已用过几次 web.powerapps.com。无论知道与否,你一直是在特定的环境中执行操作。If you have followed along with the course so far, you've spent some time working in web.powerapps.com. Whether you knew it or not, you have been working in a specific environment the whole time. 简单来说,环境就是应用和其他资源的分组(稍后将对此进行详细介绍)。An environment is simply a grouping of apps and other resources (more on this in a minute). web.powerapps.com 屏幕右上角显示指明当前环境的下拉菜单。Look at the upper right of the screen in web.powerapps.com, and you see a drop-down menu that shows your current environment.

环境选取器

如果刚开始接触 PowerApps,此时可能只会看到默认环境。If you are new to PowerApps, you might have only the default environment at this point. 单击或点击下拉菜单,看看是否有其他环境。Click or tap the menu to see if there are other environments available.

为什么要使用环境?Why use environments?

环境是应用和其他资源(如数据连接和 Microsoft Flow 流)的容器。An environment is a container for apps and other resources, like data connections and flows from Microsoft Flow. 这是一种根据业务需求对资源进行分组的方法。It's a way to group things based on business requirements. 除默认环境之外,可出于以下几个原因创建其他环境:There are several reasons to create additional environments beyond the default one:

  • 各部门单独开发应用:在大型组织中,每个部门都可以在不同的环境中工作。Separate app development by department: in a large organization, each department could work in a different environment.
  • 支持应用程序生命周期管理 (ALM):可以将正在开发的应用和已经完成并共享的应用的环境区分开来。Support application lifecycle management (ALM): you could have separate environments for apps in development and apps that you have already finished and shared.
  • 管理数据访问:每个环境都有自己的 Common Data Service 数据库,其他数据连接也专用于相应的环境(即无法跨环境共享数据)。Manage data access: each environment can have its own Common Data Service database, and other data connections are specific to the environment (i.e. they're not shared across environments).

请注意一点,环境仅与应用创建者和 PowerApps 管理员相关。One thing to keep in mind is that environments are relevant only to app creators and PowerApps admins. 与用户共享应用后,他/她只要拥有相应权限,即可运行应用。When you share an app to a user, that user just runs the app as long as they have the right permissions. 无需担心应用源自什么环境。They don't have to worry about what environment it came from.

创建环境Create an environment

到目前为止,本课程都以应用创建者为重,而环境则是由管理员进行创建和维护的。So far in this course, we have focused on app creators, but environments are created and maintained by admins. 如果不是管理员,此信息仍十分有用,因为需要就环境创建与管理员联系。If you're not an admin, this information can still be helpful when you talk to your admin about setting up environments. 在 PowerApps 管理中心内,依次单击或点击“环境”和“新建环境”。In the PowerApps admin center, click or tap Environments then New environment. 在“新建环境”屏幕上,输入环境名称,选择一个区域,以及是否为环境创建 Common Data Service 数据库,然后单击或点击“创建环境”。On the New environment screen, enter a name for the environment, select a region, select whether to create a Common Data Services database for the environment, and click or tap Create an environment.

创建环境

就是这么简单!现在便可以在新环境中工作了。That's it, you now have a new environment to work in. 此时,如果返回 web.powerapps.com,就可以在环境下拉菜单中看到它。If you go back to web.powerapps.com, you will see it in the environments drop-down menu.

管理对环境的访问权限Manage access to an environment

拥有以下角色便可以访问环境:You have access to an environment if you are:

  • 环境管理员:在环境中拥有全部权限。An Environment Admin: you have full permissions in the environment.
  • 环境创建者:不仅可以查看所有应用、创建应用,还能使用 Common Data Service(其他权限适用)。An Environment Maker: you can see all apps, create apps, and work with the Common Data Service (other permissions apply).

作为管理员,可以在“环境”选项卡中授予对环境的访问权限。首先,单击或点击一个环境。As an admin, you grant access to an environment from the Environments tab. First, click or tap an environment. 若要添加某用户(在此示例中,添加到环境创建者角色),请依次单击或点击“环境角色”和“环境创建者”。To add someone (an Environment Maker in this example), click or tap Environment roles then Environment Maker. 在这里,将用户或组添加到角色,然后单击“保存”。From there, add users or groups to the role and click Save.

管理环境访问权限

至此,你已了解环境的优势、如何创建环境以及如何授予对环境的访问权限。You now understand the benefits of environments, and how to create them and grant access to them. 即使不是管理员角色,阅读此类信息也有助于了解此服务的工作原理。Even if you're not in an admin role, it's helpful to know how this works. 至此,你已阅读完“管理应用”部分,可以继续阅读下一部分“管理数据”,此部分重点介绍了 Common Data Service。This brings us to the end of the Managing apps section, and you're well prepared to move on to the next section, "Managing data", which focuses on the Common Data Service.

恭喜!

You've completed the Managing apps section of Microsoft PowerApps Guided Learning.

你已了解操作方式...

下一个教程

Managing data

作者

  • Michael Blythe
  • olprod