问题描述
我是这个世界的新手,所以我正在学习。我很笨,所以我几乎什么都不懂。 我知道这个问题很基础,但是我已经研究了一个星期,但没有找到解决方案。 在我的工作中,我被要求找到一种方法来从 PowerShell 或 Visual Studio 连接到 PowerApps (Dataverse) 的数据和解决方案。
我一直在做研究,我能够连接并获取数据,但我仍然无法创建自定义实体(表)。我遵循了本教程 Create entities using the Organization Service,这是我拥有的代码:
static void Main(string[] args)
{
string url = "xxxxxxxx";
string userName = "xxxxxxxx";
string password = "xxxxxxxx";
string conn = $@"
AuthType = OAuth;
UserName = {userName};
Password = {password};
Url = {url};
AppId = 51f81489-12ee-4a9e-aaae-a2591f45987d;
RedirectUri = app://58145B91-0C36-4500-8554-080854F2AC97;
LoginPrompt = Auto;
RequireNewInstance = True";
var svc = new CrmServiceClient(conn);
using (svc)
{
Entity entitytest = new Entity("test");
var vid = svc.Create(entitytest);
Guid accountid = vid;
}
}
它连接正确(我审查了个人数据),但在执行它时,我在这一行出现此错误 "var vid = svc.Create(entitytest);"
:
System.ServiceModel.FaultException:名称为“entitytest”的实体 在 MetadataCache 中找不到 namemapping = 'Logical'。 MetadataCacheDetails:ProviderType=Dynamic,StandardCache=True, IsLoadedInStagedContext = False,时间戳 = 1084883, MinActiveRowVersion=1084883,MetadataInstanceId=34390963, LastUpdated=2021-05-30 11:49:56.803
我做错了什么?你知道有完整例子的网站吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)