AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 09.09.2013, 09:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
dax-ideas: Find print job settings specified on a Customer for Reports
Источник: http://dax-ideas.blogspot.com/2013/0...cified-on.html
==============

Hi Friends,
Recently I came across a requirement where in I had to print AX 2012 collection letter report in PDF format and attach it to a mail Item and send it across to the customer. The requirement here was that this functionality has to be triggered on a click of button which was pretty normal but the real catch here was that the email ID should be fetched from the customers print job settings and not a normal setup, In standard system these settings can vary according to journals. I did some research and found out a way to find print job settings of customer for collection letter journal Report. Here is the code, you can use this code for finding print job settings of many important system reports such as Invoice etc....



Static void findPrintJobSettings(Args _args)

{

FormLetterReport formletterReport;

PrintMgmtPrintSettingDetail settingDetail;

SRSPrintDestinationSettings destination;

CustCollectionLetterJour jour;

CustTable custTable;

select jour where jour.RecId == 11290923078;

select custTable where custTable.AccountNum == "2014";

formLetterReport = FormLetterReport::Construct(PrintMgmtDocumentType::

CustCollectionLetter);

formLetterReport.parmPrintType(PrintCopyOriginal::OriginalPrint);

formLetterReport.loadPrintSettings(jour,custTable,

jour.LanguageId,

jour.CollectionLetterNum);


while(formletterReport.moveNextPrintSetting())

{

settingDetail = FormLetterReport.getCurrentPrintSetting();

destination = settingDetail.parmPrintJobSettings();

print destination.printMediumType();

print destination.emailTo();

print destination.numberOfCopies();

pause;

}

}









Источник: http://dax-ideas.blogspot.com/2013/0...cified-on.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
DAX: Official Dynamics AX 2012 R2 Content (update) - Where is it, and how can you find out about updates? Blog bot DAX Blogs 0 03.12.2012 11:11
emeadaxsupport: AX 2012 Print destination settings dialog does not show up due to WMI error Blog bot DAX Blogs 0 27.09.2012 05:20
dynamicsaxtraining: Sales Blog bot DAX Blogs 0 25.04.2012 03:18
dax-ideas: Creating a SalesOrder through .net applications or BC classes Blog bot DAX Blogs 0 29.12.2010 02:16
dax-ideas: Reading an XML file in AX 2009 Blog bot DAX Blogs 0 16.11.2010 22:11

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:43.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.