如何在 TypeScript 中使用 formContext 而不是 Xrm.Page?

问题描述 投票:0回答:1

Xrm.Page 已弃用,根据要求,我需要使用 formContext 代替。当我使用除 Xrm.Page 之外的任何东西时,我在尝试使我的功能正常工作时遇到困难

导出函数 OpenQuickCreateForm(formId: string = '9add862d-3ceb-4342-99cf-fe5a952eebf8', context: Xrm.FormContext): void {

const emailadd = Xrm.Page.getAttribute("emailaddress1");

const firstName = Xrm.Page.getAttribute("firstname");

const lastName = Xrm.Page.getAttribute("lastname");

我想使用 formContext.getAttribute。

javascript typescript client dynamics-crm
1个回答
0
投票

您是否尝试使用最新的@types/xrm - https://www.npmjs.com/package/@types/xrm

© www.soinside.com 2019 - 2024. All rights reserved.