Показать сообщение отдельно
Старый 17.02.2009, 19:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
DeniZone: How to tell if a form was opened with 'Go to main table' function
Источник: http://denizone.blogspot.com/2009/02...d-with-go.html
==============

I found this sample code really helpful in connection with a customization,
where the customer wanted to alter the 'Go to main table' function.

Respect to original poster

On main datasource:
public void executeQuery()
{
query q;
querybuilddatasource qbds;
querybuildrange qbr;
int fldLookupField;
str sLookupValue;
;
if ( element.args().caller() &&
!element.args().dataset() &&
element.args().lookupField() &&
element.args().lookupValue()) //jumpref
{
sLookupValue =element.args().lookupValue();
fldLookupField =element.args().lookupField();

q=this.query();
qbds=q.dataSourceTable(this.table());
qbr=qbds.addRange(fldLookupField);
qbr.value(sLookupValue);
this.query(q);
}
super();
}





Источник: http://denizone.blogspot.com/2009/02...d-with-go.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.