How to create PDF/A file from Microsoft Dynamics Ax 2009 - pdf-generation

We need to build PDF/A file from some prints, Is there a way to build PDF/A file directly in Dynamics AX 2009?

I assume that you want to do it via X++. Here is a way to do it for a standard report.
For 'special' documents such as Sales Invoices or a customer Confirmation note here is a useful Blog (post).
Also check out the Print Management facility (it's not for all reports), and provide more for your users :)

see this link:
[https://code.msdn.microsoft.com/windowsapps/How-to-create-a-PDFA-ba742648][1]
1) add dll SautinSoft.Document.dll
2) see this code (Ax 2012)
SautinSoft.Document.PdfCompliance compliance;
SautinSoft.Document.DocumentCore document;
SautinSoft.Document.PdfSaveOptions options = new SautinSoft.Document.PdfSaveOptions();
options.set_Compliance(SautinSoft.Document.PdfCompliance::PDF_A);
document = SautinSoft.Document.DocumentCore::Load("C:\\test.pdf");
document.Save("C:\\test.pdf",options);

Related

Tool for creating object representations for Entities in Dynamics

Similar to Entity Framework I would like to know if there is a tool or nuget package I can use where I can just send the Dynamics URL and credentials in order to create object models from a Dynamics System. I'm trying to avoid creating custom DTOs.
You can use CrmSvcUtil to generate strongly-typed classes for entities.
Command line:
CrmSvcUtil.exe /url:http://<serverName>/<organizationName>/XRMServices/2011/Organization.svc /out:<outputFilename>.cs /username:<username> /password:<password> /domain:<domainName> /namespace:<outputNamespace> /serviceContextName:<serviceContextName>
GUI: (by Daryl from community)
Early Bound Generator in XrmToolbox & its video tutorial + documentation
Early Bound Generator included in the XrmToolbox is the simplest. https://www.xrmtoolbox.com/
Find the right configuration then take the command line and include it in a batch file under source control. You'll have to run it each time you add fields in CRM, depending on your needs. If you lose your starting configuration, your code might not be compatible the next time you generate.

CRM Custom Report

I made a CRM custom report with a custom code and i`m getting an error on the CRM when uploading saying that “The report server has RDLSandboxing enabled and the report contains custom code. Remove the Code element from the report definition.”
Now my question is , Is it possible to disable the RDLSandboxing?
If yes, where do I start?
Here is the code used in the report
Public Function Divider(ByVal Dividend As Decimal, ByVal Divisor As Decimal)
If IsNothing(Divisor) Or Divisor = 0 Then
Return 0
Else
Return Dividend / Divisor
End If
End Function
You can't change anything to the RDL Sandboxing when using CRM Online.
Here are a few links that contain more information on the subject.
RDL Sandboxing for Microsoft Dynamics CRM Online
Custom code that is allowed for use in Microsoft Dynamics CRM Online FetchXML Reports
You will have to change your custom code to any of the accepted Methods & Classes as you have no access to the Report Server
Reports within CRM Online don't allow custom code.
Uploading a report that contains any custom code will generate the error that you're receiving

How to read excel file tibco activities?

I have a requirement to read excel file using tibco palettes.Can any body please throw some lights regarding this. I am basically new to this tibco BW. Please tell me what steps should I follow?
I am assuming you are not referring to CSV files, for which you could use the File Read and Parse activities of BW.
If you want to parse or render a multi-worksheet workbook, you can try publicly available API's such as Apache's POI or commercial API's such as from Aspose to cut your own Java based solution. Then you can use the Java Code or general Java activities to embed and use that code.
And then there's another ready-to-use option available from us: an Excel Plugin for TIBCO BusinessWorks, if you wish to leverage all built-in features of BW (XPath mapping, etc) when parsing or rendering your Excel.
Edit 1:
As per your comment, you can also try the following steps, if you are looking for a more homegrown solution.
Based on one of the (public/commercial) libraries above you can write generic Java Code to parse each cell of each row of each sheet of the workbook. Output should be an XML string. Then create an XSD to match your output. It is at your discretion, which information of the cell you want to read from the workbook - you already are aware of the complexity of the API, I am sure.
Create a BW (sub)process that calls your code from a Java activity, use Parse XML to parse your XML string result into you XSD structure. Configure the End activity to use your XSD and map (copy) your Parse XML result into the End activity.
Then wrap this subprocess into a Custom Activity (General Activities Palette). Create a Custom Palette and now you can re-use what you did in many other BW projects. The path to the custom palettes can be found in TIBCO Designer - Edit- Preferences - General - User Directories
If you add Error Output schemas, you will also get typed error outputs from that custom activity.
HTH,
Hendrik

SSRS data-driven subscriptions saving pdf file on the parameter value passed

I have a SSRS 2008 R2 report, with a parameter employeeID. When we do the data driven subscription I am exporting the report into a PDF file.
The PDF is saved/generated as reportname.pdf by default.Can we save the pdf as reportparameter.pdf.
Example:If we have an employeeID as 223,can the PDF generated for that emoloyeeID be saved as 223.pdf.
Does SSRS support this scenario when the method of delivery is through email ?
The only way save the filename as you indicate would be using the ssrs api. You can't save to another filename using the subscription service as it will use the report name as the filename :(
you might want to check out Boomerang Notification Services for SQL server from Fuel9. The framework is easy to use and you can among other things control each file name. I think I have some sample code (tsql) doing just this so let me know if you interested and I'll see if I can dig it up for you.
Cheers,
/M

Programatically retrieve an attachment stored on a note on a CRM 4.0 entity

How would you suggest working with files that is stored on the note of a entity in Crm. Could you write a generic method that will enable you to access any type of file? Or would it be better to have a method for dealing with each type of file?
For example, we are going to be saving a mix of swf files and xml files on the entity, so would it make sense to have a method each for example:
GetXmlFilesOnAccount(accountid)
GetSwfFilesOnAccount(accountid)
When you upload an attachment to CRM the mimetype is also saved as part of the record information.
The following link contains a nice example of how to download the attachemt using a single method. http://crmscape.blogspot.com/2009/10/ms-crm-40-sending-attachments-to.html
The post is missing the actual query needed to retrieve the annotations but you can tell what columns are required from the method signature.
My suggestion using your methods:
* GetXmlFilesOnAccount(accountid)
* GetSwfFilesOnAccount(accountid)
Retrieve account activitypointers by regardingobjectid(in your case accountid guid)
Loop through returned activitypointers
Get attachments for each activitypointer (activitypointer.activityid = activitymimeattachment.activityid)
Store attachments (disk, etc)
You don't even need two methods. You can retrieve all attachment file types for a given note (annotation) with a single method.
Hope this helps.
I recently started an Open Source Project on CodePlex to accomplish exactly that. Feel free to check out the Project's Web Page at:
http://crmattachdownload.codeplex.com/
You can also view the source code under the "Source Code" tab of that same page.
Pete

Resources