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。
您是否尝试使用最新的@types/xrm - https://www.npmjs.com/package/@types/xrm