将记录从一个查询复制到同一实体中的另一个查询会导致新记录显示在两个查询中 [英] Copying records from one query to another query in the same entity results in the new record showing up in both queries

查看:106
本文介绍了将记录从一个查询复制到同一实体中的另一个查询会导致新记录显示在两个查询中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从同一实体复制记录.我要在一个查询中提取记录,然后单击一个按钮以将突出显示的记录复制到第二个查询(在同一实体上).当我执行secondquery.addNew()时,新记录显示在 这两个查询.

I am trying to copy records from the same entity.  I am pulling up records in one query, then clicking a button to copy the highlighted record to the 2nd query (on the same entity).  When I do the secondquery.addNew(), the new record shows up in both queries.

保存记录并刷新查询后,新记录就会显示在正确的查询中,并从新查询中消失.仅创建了一条记录,但它同时显示在两个查询中.我假设这是因为查询是 绑定到基础对象,并且在创建新对象时,它只会显示在绑定到该基础对象的任何小部件中.

Once I save the record and refresh the queries, the new record shows up in the proper query and disappears from the new one.  There's only one record being created, but it's showing up in both queries.  I'm assuming that's because the queries are bound to the base object and when creating a new object, it just shows up in any widget bound to that base object.

我正在使用列表框对象,甚至在任一查询上单击小号+都会在两个查询框中产生一条新记录.我将附上屏幕截图,以便您查看.

I'm using the listbox object, and even clicking the little + on either query produces a new record in both query boxes.  I'll attach a screenshot so you can see.

我认为最好的选择是每次复制一个记录时简单地保存记录,然后刷新两个查询.这比较耗时,但不会使用户感到困惑.

I think the best option is to simply save the record everytime I copy one over, then refresh both queries.  It's a little more time consuming, but won't confuse the user that way.

推荐答案

您好,

您能详细说明一下您的情况吗?您想在这里完成什么?也许除了将记录从一个查询复制到另一个查询之外,还有更好的方法吗?如果没有,那么我们可以进一步讨论如何解决您面临的问题.

Could you explain more about your scenario? what are you trying to accomplish here? maybe there is a better way other than copying the records from one query to the other? If not, then we can talk more about how to solve the problem you're facing.


这篇关于将记录从一个查询复制到同一实体中的另一个查询会导致新记录显示在两个查询中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆