Показать сообщение отдельно
Старый 14.06.2019, 22:20   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
How to enable a few fields on a form data source
Источник: http://alexvoy.blogspot.com/2019/06/...form-data.html
==============

<div dir="ltr" style="text-align: left;" trbidi="on"><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;">///
/// Helper for form data source functionality
///
class FormDataSourceHelper
{
///
/// Allow edit for given fields only; the rest is non-editable
///
/// Caller form data source
/// Container with fields numbers for allowing
public static client void allowEditFields(FormDataSource _fds, container _fields)
{
DictTable dictTable;
int fieldCnt, fieldNumber;
Set fieldsSet;

if(!_fds)
{
throw Error(Error::wrongUseOfFunction(funcName()));
}

dictTable = new DictTable(_fds.table());

if(!dictTable)
{
throw Error(Error::wrongUseOfFunction(funcName()));
}
// everything is fine if we are here already

// first convert a given container of fields numbers to a set of unique values
fieldsSet = new Set(Types::Integer);
for(fieldCnt = 1 ; fieldCnt
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.