我们能创建跨足数据域中不同表的业务规则吗?

huangapple go评论43阅读模式
英文:

can we create business rules that span across different table in dataverse

问题

我有一个从学生表到班级表的一对多关系,班级表中的查找列是学生表中的学生ID。班级表有一个名为"状态"的列,如果班级表中的所有记录的"状态"都是"已完成",我想要学生表中的"学习状态"列为"已完成",否则为"未完成"。如何在Dataverse中实现这个功能?

英文:

I have a one to many relationship from Student table and Class table, the lookup column in Class table is Student ID in Students Table. Class table has a column which is "Stutas", if all the records in Stauts in class table are "finished", I want the Student table's column "StudyStatus" to be "Completed", otherwise "Uncompleted". how to do it in Dataverse?

答案1

得分: 0

这无法通过业务规则实现。

我看到3个选项:

  1. 在表Student上注册的插件
  2. 经典工作流
  3. Power Automate流

插件在技术上是理想的解决方案:可以在事务内同步保持Student上的状态,处理要求最少。但是,您需要开发代码。

经典工作流在事务中也可以运行(当同步执行时),但在这里使其正常工作仍需要自定义代码。

使用Power Automate流,您可以在不编程的情况下构建解决方案。但是,PA流是异步执行的。

请记住,您可能不仅需要处理更新触发器,还需要处理创建和删除触发器。

英文:

It is not possible to do this with business rules.

I see 3 options:

  1. Plugin registered on table Student
  2. Classic workflow
  3. Power Automate flow

A plugin is technically the ideal solution: status on Student can be kept in sync within a transaction and processing requires minimal processing. However, you would need to develop code.

A classic workflow can also run in transaction (when it is executed synchronously), but making things work here still requires custom code.

With a Power Automate flow you can build your solution without programming. However, a PA flow is executed asynchronously.

> Keep in mind that you may need to address not only the update trigger, but also the create and delete triggers.

huangapple
  • 本文由 发表于 2023年4月17日 22:05:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76036039.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定