我已经根据用户/团队所有权的数据表创建了一个表格。
表中,只需要3个字段:
我可以看到第一个2的值,而不是所有者字段。
尝试提交表格(修改现有记录后),我会收到一条通用的故障消息。
An entry is required or has an invalid value. Please correct and try again
我怀疑该表格没有提供用于更新所有者字段的数据,这使我研究了这些多态性字段。
阅读 this , 和,我了解如何以DataCard表格向该领域的所有者展示该领域的所有者(尽管这不是我的目标)。但是我仍然在更新该字段时遇到问题。
因此,我的问题是,如果记录已经拥有所有者,我是否还需要更新它?我该怎么做?我需要使用补丁还是可以在 Update 属性中写入它,以使其与 subtsform(...)一起使用?
在这种情况下,对于我来说,所有者应根据 user()。电子邮件自动拾取。
奖励问题,在此表中创建新记录时,我还必须生成ID或DATAVERSER仍然会照顾它吗?
在同一主题上,我还必须弄清楚如何为状态字段提供“主动”值?
预先感谢您的任何帮助!
I've created a form based on a dataverse table with User/Team ownership.
In such table only 3 fields are required:
When adding those 3 field to the form I can see values for the first 2, not for the Owner field.
Trying to submit the form (after modifying an existing record) I get a generic failure message.
An entry is required or has an invalid value. Please correct and try again
I have the suspect that the form doesn't provide data for updating the Owner field, and this led me to study those Polymorphic fields.
After reading this, that and another post, I understood how to show the Owner of this field in the form datacard (although this was not my goal). But I'm still having problem updating that field.
so my question is, if a record already has an owner, do I still need to Update it? how can I do that? do I need to use Patch or can I write it in the Update property to make it work along with SubmitForm(...)?
In this case for me the owner should be automatically picked up based on User().Email.
Bonus question, when creating a new record in this table, will I also have to generate the ID or dataverse will still take care of it?
on the same topic, will I have to figure out how to provide an "Active" value for the Status field too?
Thank you in advance for any help!
发布评论
评论(1)
我最终找到了解决方案,以后任何人都需要在这里共享:
您不需要更新字段,如果未包含在表单的加载字段中,则在背景中dataverse将照顾添加所有者,状态和ID(如果正确设置在数据方面)。 因此,简单地将这些领域排除在表单之外,系统将照顾它们。
到最后是由于另一个字段,查找字段描述了与另一个表的关系。一旦我照顾在后台自动填写该字段(不可见的数据卡),它可以正常工作,但是这3个字段仍然包括在内,因此我遇到的错误。
这也回答了我的“ 奖励问题”,是的,PowerApps和Dataverse 也要在创建新项目时填写这些领域。
I found the solution in the end, sharing here should anybody need it in the future:
You don't need to update the field, if not included in the loaded fields of the form, Dataverse in the background will take care of adding owner, status, and the ID (if properly set on Dataverse side). So simply exclude those fields from the form and the system will take care of them.
It was in the end because of another field, a lookup field that describes the relationship with another table. Once I took care of filling out that field automatically in the background (not visible data-card), it worked properly, but those 3 fields were still included, hence the error that I was encountering.
This also answer to my "bonus question", yes, PowerApps and Dataverse take care of filling out those fields also when creating a new item.