Доброго времени суток.
Следующая проблема:
создал некоторую web форму, контролы туда скопировал с формы EPDocuInfoAdd
создал кнопочку и на контроле AttachFile создал код
практически один в один с формы EPDocuInfoAdd из контрола с таким же именем
X++:
public void setControl()
{
IISRequest request = new IISRequest();
IISPostedFile postedFile;
COMVariant vars = new COMVariant();
docuValue docuValue;
;
EventActionAlert::CreateAlert("yara","SETCONTROL","2","2");
sleep(1000);
if (request.fileCount() > 0)
{
EventActionAlert::CreateAlert("yara","SETCONTROL","3","3");
vars.bStr(webSession().createControlName(element, this));
postedFile = request.file(vars);
if (postedFile.fileName() != "")
{
docuRefDownload.RefTableId = docTableId;
docuRefDownload.RefRecId = docRecId;
docuRefDownload.RefCompanyId = docDataAreaId;
docuRefDownload.TypeId = WebSession().getParm(webSession().createControlName(element,editDocuTypeId));
docuRefDownload.Name = WebSession().getParm(webSession().createControlName(element,editDescription));
docuRefDownload.Restriction = DocuRestriction::Internal;
EventActionAlert::CreateAlert("yara",strfmt("%1 %2 %3 %4 %5",docDataAreaId,docTableId,docRecId,docuRefDownload.TypeId,docuRefDownload.Name));
docuValue = EPDocumentHandling::saveWebDocument(docuRefDownload, postedFile);
valueRecid = docuValue.RecId;
}
}
}
проблема в том что присоединенный фаил не грузиться в аксапту
request.fileCount() не отрабатывает, возвращает 0.
в чем может быть проблема?