Показать сообщение отдельно
Старый 09.07.2019, 01:34   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
axaptacorner: How to add document note in D365
Источник: http://axaptacorner.blogspot.com/201...e-in-d365.html
==============


classVendAccountDocument_JKS

{




staticvoid main(Args _args)

{

VendTable vendTable;

DocuType docuType;

DocuRef docuRef;

vendTable = VendTable::find('BRMF-000001');

docuType = DocuType::find('Note');

if (!docuType ||

docuType.TypeGroup != DocuTypeGroup::Note)

{

throw error("Invalid document type");

}

docuRef.RefCompanyId = vendTable.dataAreaId;

docuRef.RefTableId = vendTable.TableId;

docuRef.RefRecId = vendTable.RecId;

docuRef.TypeId = docuType.TypeId;

docuRef.Name = 'Automatic note';

docuRef.Notes = 'Added from X++';

docuRef.insert();

info("Document note has been added successfully");

}




}


Источник: http://axaptacorner.blogspot.com/201...e-in-d365.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.