当前位置:网站首页>Click the icon in Canvas App to generate PDF and save it to Dataverse
Click the icon in Canvas App to generate PDF and save it to Dataverse
2022-08-03 22:27:00 【51CTO】
我是微软Dynamics 365 & Power Platform方面的工程师/顾问罗勇,也是2015年7月到2018年6月连续三年Dynamics CRM/Business Solutions方面的微软最有价值专家(Microsoft MVP),欢迎关注我的微信公众号 MSFTDynamics365erLuoYong ,回复472或者20220803可方便获取本文,同时可以在第一间得到我发布的最新博文信息,follow me!
以前的文章 Dynamics 365触发Microsoft Flow自动生成PDFand send it as an attachment 写了通过Word Connector来生成PDF文件,Today's article goes a step further,Describes how to handle itPDF中的列表数据,I am here to show that the contact list of selected clients are all printed out.
Today's article starts withCanvas App为例进行演示,点击按钮调用Cloud Flow执行操作.
First I make firstWord模板,I will not repeat what I said in the previous blog post,Briefly describe how to deal with the following table,主要是参考 Intermediate | Flow of the week: Create PDF Invoices Using Word Templates with Microsoft Flow 文章.
Mainly list words,Only two lines are used,One line is the list title,The other row is sample data,After selecting this row of sample data,点击Ribbon功能区的Developer这个Tab下的Repeat Section Content Control.Then each column remains the same as any other placeholder,设置为Plain Text Content Control.

为了方便映射,The two names I have here are set as the logical names of the corresponding fieldsfullname和 emailaddress1 .

You also need to upload this template to Onedrive或者Onedrive for business上,我这里是上传到Onedrive上,如下图.到此,The preparation of the template is complete.

Then I'll handle itCanvas App中的工作,Add one to the record's view details interfacePDF document的图标(icon).

再点击左侧的Power Automate图标,然后点击 Create new flow 按钮.

The next job is to create a new oneFlow了.出来的界面如下,There is no template I need,所以我点击 Create from blank 按钮.

首先新增一个 Initialize variable的变量,这个变量的ValueClick from the dynamic window Ask in PowerApps,这就是这个Flowreceived fromCanvas App的参数.记得保存flow之前为flowPick a meaningful name,Auto-generated names are ugly.

Then it is to query the information of customers and their contacts below,I have talked about the method of querying child records based on parent records,请参考 Dynamics 365查询父实体并返回子实体信息的方法 .I'm only showing screenshots here.

下面就是添加 Word Online (Business) 这个Connector下面的 Populate a Microsoft Word template的Action.

前面这些placeholderAssignment to fields is simple,The assignment of the list needs to click on the mark marked below Switch to input entire array 按钮.

Then I use expressions outputs('Get_contact_info')?['body/contact_customer_accounts'] 为这个字段赋值,效果如下:

然后增加一个OneDrive for Business下面的Create file步骤,我的设置如下:

再增加一个Word Online (Business) 这个Connector下面的 Convert Word Document to PDF的Action.

我这里设置如下,The expression used is concat('/Outputs/客户_',variables('AccountId'),'.docx') .

再添加Microsoft Dataverse Connector下的 Upload a file or an image 这个action.

我这里设置如下:
Content name The expression used is concat('客户_',variables('AccountId'),'.pdf')

Add one more final step,那就是PowerApps这个Connector下的 Respond to a PowerApp or flow,这是Canvas App调用flowrequired last step.

The last step is to generatePDF的图标的OnSelectThe code for the event execution is changed to the following:

Generated after clicking to testpdf效果如下:

边栏推荐
- 工作小计 QT打包
- 嵌入式系统:GPIO
- 直播预告 | 构建业务智联,快速拥抱财务数字化转型
- Boss: There are too many systems in the company, can you realize account interoperability?
- Conditional Statements for Shell Programming
- Gains double award | know micro easily won the "2021 China digital twin solution suppliers in excellence" "made in China's smart excellent recommended products" double award!
- 数据一致性:双删为什么要延时?
- Basic Concepts of Graphs
- 老板:公司系统太多,能不能实现账号互通?
- start with connect by 实现递归查询
猜你喜欢

Gains double award | know micro easily won the "2021 China digital twin solution suppliers in excellence" "made in China's smart excellent recommended products" double award!

用于流动质押和收益生成的 Web3 基础设施
![[MySQL Advanced] Creation and Management of Databases and Tables](/img/31/2015122e409148b3679b09a03db869.png)
[MySQL Advanced] Creation and Management of Databases and Tables

Flutter 桌面探索 | 自定义可拖拽导航栏

中国企业构建边缘计算解决方案的最佳实践

嵌入式系统:概述

encapsulation, package, access modifier, static variable

HCIP BGP实验报告

CAS:153162-70-0_N-BOC-6-Biotinamidohexylamine

《数字经济全景白皮书》金融数字用户篇 重磅发布!
随机推荐
HCIP BGP实验报告
pikachu Over permission 越权
483. Smallest Good Base
Lift, Splat, Shoot: Encoding Images from Arbitrary Camera Rigs by Implicitly Unprojecting to 3D 论文笔记
如何创建一个Web项目
log4j-slf4j-impl cannot be present with log4j-to-slf4j
投资性大于游戏性 NFT游戏到底是不是门好生意
Golang第一章:入门
What is Adobe?
七夕快乐!
Work Subtotal QT Packing
工作小计 QT打包
关于IDO预售系统开发技术讲解丨浅谈IDO预售合约系统开发原理分析
嵌入式系统:GPIO
【云原生实用技巧】使用 skopeo 批量同步 helm chart 依赖镜像
384. Shuffle an Array
Adobe是什么?
472. Concatenated Words
Recognized by International Authorities | Yunzhuang Technology was selected in "RPA Global Market Pattern Report, Q3 2022"
Nine ways to teach you to read the file path in the resources directory