Quantcast
Channel: Acumatica Singapore
Viewing all 110 articles
Browse latest View live

Free Acumatica Sandbox

$
0
0
Hi Everyone,

Acumatica team released a marketing document, explaining sandbox usage. What I am really happy about is a clear black and white statement there.

We are not robbing our customers when they decided to use Acumatica sandbox for training, testing, archival purposes. Local sandbox is free of charge.

Would you decide to put it on our cloud, it will have some nominal fees involved, but again, if you need it FOC, install locally and enjoy!

WHAT IS AN ACUMATICA SANDBOX?
An Acumatica Sandbox is a separate instance of your Acumatica environment. You can
do anything you want in the sandbox – all without impacting your current deployment
and your users.

A Smooth Transition For New Rollouts Or New Employees
Leverage an Acumatica Sandbox to give new or existing users a hands-on experience
with Acumatica. Safely verify features and functionality, grant limited access to drive
adoption with power users without impacting other groups of less frequent users, and
also test customizations and integrations before making them live.

A Reliable Development Environment
An Acumatica Sandbox allows you to develop and test new solutions for your
organization in an environment that mirrors your live implementation. This enables
you to test real-world scenarios and involve users from different function areas before
going live.

Sandbox + Snapshot = Peace Of Mind
If you have a Private Cloud sandbox, you can use Acumatica’s advanced snapshot
technology to quickly set up your sandbox. You can take a snapshot of your Acumatica
instance at any time, and restore the downloaded copy to the sandbox environment
which you then manage separately. This enables you to test or modify your current
Acumatica instance without impacting users or your live deployment. Your partner can
help set up your first local instance.

WHICH SANDBOX IS RIGHT FOR ME?
Acumatica offers multiple sandbox options to meet your business requirements.
Whether you have a SaaS, SOP, or perpetual license, you can deploy your sandbox
wherever you prefer.



Thank you Acumatica team!

All the best,

Sergey.


Performance Profilers in Acumatica

$
0
0
Hi Everyone,


In the latest Acumatica version 5 we have added 2 powerful tools to help you finding bottle necks while designing your applications at Acumatica Framework.


There could be 3 types of potential areas of interest for developer/consultant.


A. SQL Server. Luckily we have native Microsoft SQL Profiler to address that. So my article will be about the other part. IIS.


B. Internet Information Server Memory resources.


C. Internet Information Server CPU resources.


Memory Profiler.

This utility can provide us detailed information on memory usage by the IIS server, with per session tracking.
Once started, screen get the memory snapshot from the IIS. Please pres refresh button on the grid and we will see all the session information.

If we click Details, it will display per session memory usage like below:


On the right side of the screen it shows amount of used memory per process.

Request Profiler.

Is a tool to investigate time taken by an IIS request, to execute the business logic or other tasks performed by the user. Once you opened the screen, please make sure check boxes below are ticked.


Then, once you refreshed the results, the grid will populate results. What I have done is run GL Transactions screen, and here is the result:


As you may have noticed, longest process was Release, it took 0.5 sec of the single cpu IIS execution time.

Happy debugging,

Sergey.

Sending Mail Issues. SMTP server configuration.

$
0
0
Hi Everyone,

For those using Send Mail functionality in Acumatica, there is almost always a problem with SMTP servers, they may not process your e-mail due to certain conditions are not met.

For example, you may have Office 365 account and willing to add it to Acumatica as a system E-Mail account.

There will be an issue when other persons start sending mails from Acumatica, as Office 365 server require Sender to be exactly your account name or at least a person from your domain.

There could also be a case when you set up Acumatica in your internal domain, and are not willing to expose / connect it directly to a public mail server.

Easiest way to avoid these problems is to install an SMTP Relay server at your office. Well this is not really a hardware box server, just a piece of software running on one of your machines, it could even run on Acumatica server itself, as it does not depend on anything, well at least we don't want it to.

So I was looking for a good candidate for SMTP relay with some "alter" functions on the outgoing e-mails and found this software:  EMailRelay Software

This is not just open source, freeware, SMTP relay. It is also a Message Transfer Agent. Meaning it can change the Envelope of your E-Mail, it can also change the content of the Header or Body of your E-mail.

This is perfectly what we need - to alter "From:" address, in case of Office 365 usage.

Also this software can work as a server. I will not go deep into installation procedures, it is simple enough, just download correct version (32 or 64 bit) then unpack it, run the configurator, it will guide you through simple steps. Put Office 365 Server as a relay server. Make sure port 25 is open for incoming E-Mails. You can also configure it as a service, to run when you log off from the machine.

Now, the most interesting part, altering the body of the message and envelope.

Software comes with 4 examples in JavaScript, that you can use.
What it does: when message is received from Acumatica, but not yet relayed to Office 365 SMTP, there is an option - to run Java Script and alter the content of the E-Mail.

What I have done in my script file, you can make your own file by the way:


Please make sure you added a call into a BAT file that system created for SMTP relay, to invoke these alterations. --filter parameter.



Happy mailing!

All the best,
Sergey.

Adding Verification Logic to a Field

$
0
0
Hi Guys,

There is a common customization task to add some piece of business logic to a field.
Here is the example of adding verification to a Journal Transaction screen.

In short, for certain Accounts (Expense and Income) I will need to check that user entered Customer or Vendor into Journal Transaction screen. Balance Sheet accounts should be skipped.

Here is how it supposed to look like:


Thanks to a reworked Acumatica API documentation, it was not a Rocket Science to develop a simple piece of code below that covers this logic:


Please take note of:

sender.RaiseExceptionHandling<GLTran.referenceID>(e.Row, row.ReferenceID, new PXSetPropertyException(ErrorMessages.FieldIsEmpty , PXErrorLevel.RowError, typeof(GLTran.referenceID).Name));

That identifies where exactly to show a red cross Error.

All the Best,

Sergey.

Debug in version 5.1. Finally it works!

$
0
0
Hi Guys,

Quick post today.
It seems that application debugging in version 5+ is not an easy task.

What to do to achieve it:

1. Make sure Application pool is in Classic mode, not Managed Pipeline Mode.

2. Make sure you added below highlighted in Red setting in web.config:

<compilation debug="True" defaultLanguage="c#" numRecompilesBeforeAppRestart="9999" targetFramework="4.5.1">

3. Also add this key to web.config into appsettings section:

<add key="UseRuntimeCompilation" value="False" /> 

4. Make sure you have installed Visual Studio 2012, .NET 4.5.1, and .NET 4.5.1 Multi Targeting Pack

5. No need to install Acumatica Framework :)

6. Create New Extension Library (Dummy One) under Customization Project Editor. This will create a solution link for Visual Studio.

7. Open Visual Studio. Navigate to App_Code/Caches.

Here we are :) Attach to the process and Enjoy.

All the best,

Sergey.

Major change in Cash Sale Document Numbering in version 5.

$
0
0
Hi Everyone,

If you were using Cash Sale screen in AR module in versions below 5.XX, you may have noticed that running number for the Document was generated based on AR Payment ID sequence.

Starting from version 5 the numbering sequence had changed to be AR Invoice ID Numbering for that type of document.

However, if you still wish to retain the existing order for your document numbers, you need to apply а customization below.

1. Create public class under your customization project for CashSales screen:




2. Change the field attribute to use the above class:


3. Save and Publish the customization.

From now on, Cash Sale Numbering will be taken from ARPayment sequence, as it was before.


Please note the same approach can be used for any AutoNumbering customizations in Acumatica.

All the best,

Sergey.

Urgently Require Acumatica Consultant and Support Engineer in Singapore

$
0
0
Hi Guys,

Please let me know if anyone from Singapore is keen to work as a consultant and support engineer.

Location: Singapore

I am really shorthanded and looking for a bright candidate. Please drop me an e-mail if interested.

Thanks,

Sergey.

P.S. Agents/Hiring Agencies please do not bother, I am looking for direct candidates.

Login Page Customization.

$
0
0
Hi Guys,

Some time ago, there was a post on how to change the login pictures if you have access to Acumatica web site folder. But nowadays we all go cloud, heh, so no more access to IIS folders directly.

Well, so THIS POST is about How To Change the Login Pictures for your customer, without directly changing the files in the folder.

We can accomplish it by using simple customization technique. It proven on version 5.1 onwards, but should work on earlier as well.

What we are going to do is - by using a customization we will replace the files, located at the web site folder :)

Let's make it very simple, sorry, experienced C# developers, I will go step by step, so everyone can follow.

1. Make sure you can connect to Acumatica as a Customizer.

2. Place your picture files, resolution 1500 x 1000 pixels, in jpg format in a local folder on your working PC or laptop.
There should be max 6 pictures.


3. Login to Acumatica. Say goodbye to this guy. You are seeing him the last time...




4. Navigate to: Configuration->Common Settings->Site Preference



5. Upload here all your 6 files. Just Press Files->Then drag and drop all the files into upload screen.


6. Close the Files upload screen. Refresh the Site Preference screen. Click on FILES menu again. Now let's see all those files one by one in the browser. We need it to get ReferenceID for each file.
Just click on each file link, it will open you a tab in the browser.


Please note the number you need to record is highlighted. Please pull all 6 numbers for all 6 files into your notepad for future reference.


7. Now we are ready to hack Acumatica and insert our files directly into WEB site folder :) by customization. Go to System->Customization->Customization Projects. If you have one, select it, if you do not have existing customization, just create a new project. Then click on it. It will open a screen. There choose File->Edit Project XML



8. Now manually add the following records right after first line:

<File AppRelativePath="Icons\login_bg1.jpg" FileID="42acd25f-b952-46a2-aae8-35a802d1d47a" />
<File AppRelativePath="Icons\login_bg2.jpg" FileID="ac45d04a-7c4a-4cf1-bf42-3cdb517eecc6" />
<File AppRelativePath="Icons\login_bg3.jpg" FileID="28ee3171-e330-4de4-83bf-750e31eb2168" />
<File AppRelativePath="Icons\login_bg4.jpg" FileID="8d6876f9-5721-45e1-b481-9ca36e5eff49" />
<File AppRelativePath="Icons\login_bg5.jpg" FileID="809703c6-a689-4218-8347-a6d78f563ae0" />
<File AppRelativePath="Icons\login_bg6.jpg" FileID="b11ad862-1ef2-47d4-8c8b-f398383552b1" />

Please note last part is the reference from out Notepad.



9. Press button Save to database. Screen will refresh and your records will be moved somewhere down to the file body, you can find them by scrolling down, no worries, they are NOT gone.

10. Now from the menu on top choose Publish->Publish Current Project. Validation will start and prompt you a message:

Ignore it :). Press Publish.

11. Enjoy your brand new Acumatica system


All the best,

Sergey.

Reporting - Excel simple format support.

$
0
0
Hi Guys,

As you aware, Export in Excel Simple format is deprecated.
It is not available from version 5 onwards.

What you are not aware, probably.
For those who were using it in earlier versions, please take note.

If you are going to open and edit your old version report with the new version Report Designer.
It is going to kill your Excel Simple Export settings irreversibly.

Therefore, please make sure using Old Report designer to correct/edit Older versions reports.

Other words, there is no compatibility in the future versions of report designer with the older versions of the software. You can not edit and save reports of version 3.00 by report designer from version 5.00
It will spoil the report.

All the best,
Sergey.

Acumatica is on Gartner Magic Quadrant

$
0
0
Congratulations Everyone!

We have finally made it, now Acumatica is on Gartner.
You request for a copy here:   Request Gartner Report


At the same time, PC Magazine made us top brands. I can not believe it :)


Full article here:

PC Magazine 2017

All the best,
Sergey.

Amount to Words conversion at Acumatica Reports

$
0
0
Hi Everyone,

As we do not yet have Amount to Words function inside our top notch Report Designer, let me share one created to print cheques from AR module.

Same logic applies and can be reused anywhere inside Acumatica Report Designer. I did it for up to 10,000 amount, but you can easily extend it upwards.

1. First of all lets create few Variables on top of the Reporting Group where we are going to use A2W conversion.

a) AmountCents - that will be total amount converted to Cents. I used ARPayment.CuryOrigDocAmt but you can use ANY other numeric field as a SOURCE
b) AmtThousands - that will be just how many thousands we have
c) AmtHundreds - displays number of hundreds only
d) AmtOnes - Ones only
c) AmtCents - Cents only


Below are all the formulae:

AmountCents:
=CInt([ARPayment.CuryOrigDocAmt]*100)

AmtThousands:
=Floor($AmountCents/100000)

AmtHundreds:
=Floor(($AmountCents-$AmtThousands*100000)/10000)

AmtTens:
=Floor(($AmountCents-$AmtThousands*100000-$AmtHundreds*10000)/1000)

AmtOnes:
=Floor(($AmountCents-$AmtThousands*100000-$AmtHundreds*10000-$AmtTens*1000)/100)

AmtCents:
=CInt(Right(CStr($AmountCents),2))

2. Secondly add quite long formula into the field itself, here it is:

Your Field: =Iif($AmtThousands<>0,Switch($AmtThousands=10,'Ten',$AmtThousands=9,'Nine',$AmtThousands=8,'Eight',$AmtThousands=7,'Seven',$AmtThousands=6,'Six',$AmtThousands=5,'Five',$AmtThousands=4,'Four',$AmtThousands=3,'Three',$AmtThousands=2,'Two',$AmtThousands=1,'One') + ' Thousand ','') + Iif($AmtHundreds<>0,Switch($AmtHundreds=9,'Nine',$AmtHundreds=8,'Eight',$AmtHundreds=7,'Seven',$AmtHundreds=6,'Six',$AmtHundreds=5,'Five',$AmtHundreds=4,'Four',$AmtHundreds=3,'Three',$AmtHundreds=2,'Two',$AmtHundreds=1,'One') + ' Hundred ','') + Iif($AmtTens<>0,Switch($AmtTens=9,'Ninety',$AmtTens=8,'Eighty',$AmtTens=7,'Seventy',$AmtTens=6,'Sixty',$AmtTens=5,'Fifty',$AmtTens=4,'Forty',$AmtTens=3,'Thirty',$AmtTens=2,'Twenty',$AmtTens=1,'') + '','') + Iif($AmtTens=1,Switch($AmtOnes=9,'Nineteen',$AmtOnes=8,'Eighteen',$AmtOnes=7,'Seventeen',$AmtOnes=6,'Sixteen',$AmtOnes=5,'Fifteen',$AmtOnes=4,'Fourteen',$AmtOnes=3,'Thirteen',$AmtOnes=2,'Twelve',$AmtOnes=1,'Eleven',$AmtOnes=0,'Ten') + '','') + Iif($AmtTens<>1,Switch($AmtOnes=9,'Nine',$AmtOnes=8,'Eight',$AmtOnes=7,'Seven',$AmtOnes=6,'Six',$AmtOnes=5,'Five',$AmtOnes=4,'Four',$AmtOnes=3,'Three',$AmtOnes=2,'Two',$AmtOnes=1,'One',$AmtOnes=0,''),'') + Iif($AmountCents=$AmtCents,'Zero','') + Iif($AmtCents=0,' Only',' and ' + CStr($AmtCents) + '¢ Only')

3. Let see what we got:

It works only up to 10k, but if you wish, you can add in front of the formula further parsing.

All the Best,
Sergey.

Date Conversion Formats. TSQL.

$
0
0
Hi Everyone,

Hope this conversion table will help to present date and time in proper way.

For example if you wish to see the current date, in MM/DD/YY please use 1 as a format:

Statement:

SELECT CONVERT(varchar(120),GETDATE(),1)

Will return you 12/28/17

In general, using SELECT CONVERT(varchar(120),GETDATE(),FORMAT)

Where FORMAT is just a number from the list will provide you respective output:

output                   style
Apr
2820149:31AM 0
04/28/141
14.04.282
28/04/143
28.04.144
28-04-145
28 Apr 146
Apr
28,147
09:31:288
Apr
2820149:31:28:580AM 9
04-28-1410
14/04/2811
14042812
28 Apr 201409:31:28:58013
09:31:28:58014
2014-04-2809:31:2820
2014-04-2809:31:28.58021
04/28/149:31:28 AM 22
2014-04-2823
09:31:2824
2014-04-2809:31:28.58025
Apr
2820149:31AM 100
04/28/2014101
2014.04.28102
28/04/2014103
28.04.2014104
28-04-2014105
28 Apr 2014106
Apr
28,2014107
09:31:28108
Apr
2820149:31:28:580AM 109
04-28-2014110
2014/04/28111
20140428112
28 Apr 201409:31:28:580113
09:31:28:580114
2014-04-2809:31:28120
2014-04-2809:31:28.580121
2014-04-28T09:31:28.580126
2014-04-28T09:31:28.580127
28جمادىالثانية14359:31:28:580AM 130
28/06/14359:31:28:580AM 131
All the best,
Sergey.

The Learning Lab - Acumatica Customer of the Year

$
0
0
Dear Reader!

I am Proud to announce:

The biggest Private Primary and Secondary Learning Provider in Singapore - The Learning Lab just achieved the Customer of the Year award at Acumatica Asia Roadshow 2018 !

 
Together with Info Cloud Asia - leading consulting firm in Singapore, TLL achieved flawless implementation and integrated Acumatica with the CRM front end, Attendance Tracking Security system as well as Claim Tracking.

Congratulations - it was an example of great team work!

All the best!

Automatic Updates and Apply Updates screen Issues

$
0
0
Hi Guys,

Today I have faced an issue for one of my clients when tried to publish the customization.
I was trying to put the server in the Maintenance Mode.

As you aware, there is an option in Acumatica to do the auto update.
By default it is partially on, and pointing to the acumatica server:



Please note, even if you did not check "Check for Updates" option,
EVERY TIME YOU OPEN THE SCREEN IT GOES TO http://update.acumatica.com JUST TO VERIFY THE SERVER IS ON.

So what happened today is that Acumatica update server was down and it caused me to wait XX seconds till the timeout to see this:



In short, it is highly recommended, if you do not use the Auto Update feature, please do a complete cleanup till you have it like this:
In this case every time you need to put the server in Maintenance Mode, there will be no timeout, as system will know there is no update server, so no need to ping it:



No more error, just  a warning and no delays.

All the best,
Sergey.

Need an Acumatica Developer in Singapore.

$
0
0
Hi Everyone;

IF

You are a good developer in Acumatica framework
AND
Have 3 or more years of experience in developing Acumatica screens and functions
AND
(I know you OR (heard about you from Acumatica development team AND what I heard was positive))
AND
You are willing to work in Singapore

THEN
Please send me an email (you should know it) or just reply here with the request.

ELSE
Thank you, Sergey.

Acumatica Notification. How to Pass Empty Field Condition.

$
0
0
Hi Guys,

Today will be a short one.

Just realized Acumatica is not very good at handling conditions at Notifications screen.

Basically when you need to Notify someone you create Automation Notification with the exact condition of when to do it.

Potentially, there could be a case when you wish to call a notification ONLY when certain field is Empty. So, how?

It is empty, does not mean NULL, because field may be not nullable, so IsNull will not work.
How? ='' Does not work..... Any other ideas?

After 30 mins of various tries found a solution.


In my case TnC field supposed to be empty. So we use:

Start With in the Condition column, AND we just put ONE single SPACE into Value field.

You cant see space on the picture but I tell you it is there....

OMG.....

Best,
Sergey.

Retrieving Large Volume of Data via WEB Service in Acumatica

$
0
0
Hi Everyone,

Well I promised to write few posts about WEB services...
This is the first one, where we are to get BIG data FROM Acumatica.
Using a Generic Inquiry !

Prerequisite - no knowledge about Acumatica platform whatsoever :), common sense and C# as a newbee.

First of all I would create a Generic Inquiry in Acumatica to get our data ready.
Please note that in order to get data without timeout errors, it must be arranged in batches.

Due to the fact that Acumatica does not handle Rowcount in GI's well enough, and we can't relay on it, so we would need to arrange our data in a table properly BY OURSELVES.

I tried few scenarios and it looks like getting data in batches of 1000 lines works the best way.
WEB service does not die out and process is not getting interrupted.

So, step by step now.

1. Please create a GI (Generic Inquiry) first. Silly example below:


Please take note, I have added two special columns, Processing Batch and Maximum Batch Number.
This is to organize WEB service better, later you will see why do we need these two.
In short - it will minimize server calls and facilitate uninterrupted data flow.

2. Look at the design screen for this GI:

a) Data in the GI must be sorted by Processing Batch. In order to appear in the orderly manner for export. This is important!

b) Put some conditions in the GI so you have only that number of rows that you need. In my case getting 112 batches 1000 rows each, looks scary already... 112k records...

c) create underlying View or Table in the database to reflect Processing Batch and Maximum Batch numbers correctly. Correctly means have a Primary Key, don't make table too wide to facilitate speed of data extraction.

d) Convert that table into a Data Access Class (DAC) to then later use in the GI as a data source (hint - use my older blog to find how to convert view/table to DAC)

e) Format GI nicely so when you look at it, you experience proud and pleasure. :)

Regarding those special fields:

Processing Batch - is a number (int), representing a chunk of lines, by 1000 lines each.

Maximum Batch - is the last Processing Batch number (int).

Note: "Maximum Batch" number is the same for all rows, while "Processing Batch" number is changing for every thousand of rows.

In order to create such numbering in a table I used a process on SQL, in that update, LineNbr is just a Primary Key, you can use any other PK actually:

update MYTABLE set BatchNbr = s.BatchNbr, 
[MaxBatchNbr] = (select FLOOR(count(*)/1000)+1 from MYTABLE) 
from MYTABLE p 
inner join (select BatchNbr = FLOOR(ROW_NUMBER() OVER(ORDER BY LineNbr ASC)/1000)+1,LineNbr,CompanyID from MYTABLE) s 
on p.CompanyID = s.CompanyID and p.LineNbr = s.LineNbr

Again, you will see later, why we need these numbers to be IN an SQL TABLE itself.
Just accept it for now, ok.

3. Give that GI Access rights in Acumatica so the user we use for the web service, will be able to see it. Place it somewhere on your Site Map. Important, we cann our GI CRMPAY

4. Create the Endpoint. Insert CRMPAY there. Add fields. Please note our special fields are there too:



5. Click VIEW ENDPOINT SERVICE button to get a link to the web service. Just copy the link to somewhere to keep, from the address bar, it will be something like: https://yourserver/yourendpointname/endpointversion?wdsl

6. Open your Visual Studio and create a new template Project type C# Console, give it a name, I called it BLOG.



7. In order to connect to your web service via https we will need to add some code to the project. Open Program.cs in your project and add this block to it:

Before:



After. What was added is in BLUE:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

namespace BLOG
{
    class Program
    {
        static void Main(string[] args)
        {

            //This code is necessary only if you connect to the website
            //through the HTTPS connection and
            //you need to use custom validation of an SSL certificate
            //(for example, if the website uses a self-signed certificate).
            ServicePointManager.ServerCertificateValidationCallback += new
            RemoteCertificateValidationCallback(ValidateRemoteCertificate);
            
            using (DefaultSoapClient soapClient = new DefaultSoapClient())
            {
                //Log in to Acumatica ERP
                soapClient.Login
                (
                Properties.Settings.Default.UserName,
                Properties.Settings.Default.Password,
                Properties.Settings.Default.CompanyName,
                Properties.Settings.Default.Branch,
                null
                );
                try
                {
                    //You will add the integration code here
                    CRMDataRetriever.ExportCRMPayment(soapClient);
                }
                catch (Exception e)
                {
                 
                    Console.WriteLine(e);
                    Console.WriteLine();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadLine();
                }
                finally
                {
                    //Log out from Acumatica ERP
                    soapClient.Logout();
                }
            }
        }

        //Callback, which is used to validate the certificate of
        //an Acumatica ERP website in an SSL conversation
        private static bool ValidateRemoteCertificate(object sender,
        X509Certificate cert, X509Chain chain, SslPolicyErrors policyErrors)
        {
            //For simplicity, this callback always returns true.
            //In a real integration application, you must check
            //an SSL certificate here.
            return true;
        }

        }
    }
}

8. You have noticed, Visual Studio prompting that some parts of the code above are not in yet:

 It is time to add web service to the Project. Click Add Service Reference:




Then indicate the link from Item 5. And give it a name. Click OK:


You may be prompted for a certificate mismatch, just accept it.

9. Add a namespace to the top portion of the Program block and you will immediately notice some errors are gone:


10. Do 1,2,3,4 as displayed. Just right click at your project then do 1,2,3,4 actually:


11. Now we should provide some security references here to get logged into Acumatica. So just add four items exactly as below, then save project:



12. And, we supposed to get left with the only Error. Will be fixing that one then:


13. Lets create that class CRMDataRetriever, where we are going to add the code:

a) Add the class:



b) Give it a name and Add:


c) Add into the top section of the class these two namespaces:

using BLOG.BLOGSERVICE;
using System.IO;

d) Insert code into the class. In my case code will retrieve the first Batch, then one by one subsequent:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLOG.BLOGSERVICE;
using System.IO;

namespace BLOG
{
    class CRMDataRetriever
    {

        public static int? processBatchNbr = 0;

        //Retrieving the list of CRM Payment Items
        public static void ExportCRMPayment(DefaultSoapClient soapClient)
        {
            Console.WriteLine("Retrieving the list of Students...");
            
            var crmPaymentsToBeFound = soapClient.GetList(
                new CRMPAY

                {
                    //Specify return behavior - we are getting ALL the fields
                    ReturnBehavior = ReturnBehavior.All,
                    //Filter the items by the BatchNumber
                    BatchNbr = new IntSearch
                    {
                        Condition = IntCondition.Equal,
                        Value = 1
                    }
                });

            //I am writing it into a csv file
            using (StreamWriter file = new StreamWriter("CRMPayments.csv"))
            {

                //Add headers to the file
                file.WriteLine(
                "BatchNbr,LineNbr,StudentCRMID,Term,Year,CourseID,PaymentStatus,");

                //This is maximum batch to process and writing batch one
                foreach (CRMPAY crmPaymentsToBeFoun in crmPaymentsToBeFound)
                {
                    processBatchNbr = crmPaymentsToBeFoun.MaxBatchNbr.Value;


                    Console.WriteLine("Retrieving the First Record ...");

                    //Write the values for each item
                    file.WriteLine(string.Format("{0},{1},{2},{3},{4},{5},{6},",
                    crmPaymentsToBeFoun.BatchNbr.Value,
                    crmPaymentsToBeFoun.LineNbr.Value,
                    crmPaymentsToBeFoun.StudentCRMID.Value,
                    crmPaymentsToBeFoun.Term.Value,
                    crmPaymentsToBeFoun.Year.Value,
                    crmPaymentsToBeFoun.CourseID.Value,
                    crmPaymentsToBeFoun.PaymentStatus.Value));
                }

                while (processBatchNbr != 1)
                {
                    CRMPAY filter = new CRMPAY
                    {
                        BatchNbr = new IntSearch
                        {
                            Condition = IntCondition.Equal,
                            Value = processBatchNbr
                        },
                        ReturnBehavior = ReturnBehavior.All
                    };
                    Entity[] crmPayments = soapClient.GetList(filter);

                    processBatchNbr = processBatchNbr - 1;


                    //Write the values for each item
                    foreach (CRMPAY crmPayment in crmPayments)
                    {

                        file.WriteLine(string.Format("{0},{1},{2},{3},{4},{5},{6}",
                        crmPayment.BatchNbr.Value,
                        crmPayment.LineNbr.Value,
                        crmPayment.StudentCRMID.Value,
                        crmPayment.Term.Value,
                        crmPayment.Year.Value,
                        crmPayment.CourseID.Value,
                        crmPayment.PaymentStatus.Value));

                        Console.WriteLine("Subsequent Rercord written into a file...");

                    }
                }
            }

        }


    }

14. Please note every time we call web service, we know what will be the next batch from the processBatchNbr variable, which we set once we retrieved the first record. Within a batch of records we follow based on the BatchNbr field condition. We do not do any calls to the web service which are redundant or unnecessary.

15. In order for WEB service to login correctly we have to enable cookies in the project config file. We should do it manually. 

a) Open app.config file in the notepad


b) Modify it slightly to allow cookies at the areas highlighted. Save. Close:



16. Build the project, get BLOG.exe file at the bin/Debug folder and run it.

Enjoy csv file getting produced and endless messagess popping up at the console :)




All the best,
Sergey.

P.S. Next blog will be about using OData to get the BIG DATA via WEB service of course...

Enabling and Monitoring TLS on Acumatica

$
0
0
Hi Guys,

There is a lot of hoo-ha recently about switching to TLS 1.2....

Well, mainly, the sound comes from Acumatica marketing team and also from some of those  "security advisers", reviewing for us what is secure and what is not.

So, here is the proposed way to enable TLS 1.1 and/or TLS 1.2 on your IIS server.

And also proposing a way to make sure (or monitor) that your dear clients are connecting their browsers using secure protocols.

What we need to do first is to disable insecure protocols and enable secure ones.

Adding TLS 1.1 and/or TLS 1.2 to your server

If you wish to add just TLS 1.2 please download a file and add registry information to your IIS SERVER, here is the example of the file from Rahul Kumar's blog:

TLS 1.2 ONLY

You can also manually create reg file with this content. Please Note that this will also disable some less secure protocols like SSL 2.0, SSL 3.0, TLS 1.0 and TLS 1.1:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

If you wish to leave TLS 1.1 enabled, please use another script instead:

TLS 1.1 and 1.2

Content would be like below, if you prefer to create .reg files manually:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

After registry is updated please restart your server.

There could be an issue with FIPS enabled in your system, if .NET throws an error that:

"This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms."

All you need to do is to disable FIPS under Local Security Policies.

Disabling FIPS under Local Security Policies

1. Open Control Panel, click Administrative Tools, and then double-click Local Security Policy.
2. Under Local Security Settings, expand Local Policies, and then click Security Options.
3. Under Policy in the right pane, double-click System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing, and then click Disabled.
4. Run gpupdate /force

Monitoring the client communications protocol

This is the best part actually. After you enabled TLS 1.2 it is time to show the auditors that you are compliant 100% with what is called security. Today. So we may have IE, FireFox and Chrome. 

Check the security protocol used on Internet Explorer

First you need to connect to your Acumatica using IE. I am demonstrating customer who is using Acumatica version 3.0. And, yes, 3.0 also supports TLS 1.2. Please note it should be HTTPS protocol of course:

https protocol acumatica tls 1.2

Secondly, right click on the header of the screen (do not right click on grid!) and you will see a choice drop down. Click Properties:

TLS Version


Third, check the Connection. 

Connection Properties


Check the security protocol used on FireFox

Login, Click on (i) option, list to second page, enjoy

TLS Firefox


Click on this arrow > and you will see option then click More Information

More Information

Then you will see detailed info

Firefox TLS


Check Security protocols used on Google Chrome

Here you need to press F12 and then choose Security option:

TLS Options



 All the best,

Sergey.

Adding Links to Notification Emails

$
0
0
Hi Everyone,

There is sometimes a task to add dynamic or static links to system generated Notifications.
Here is how to do it.

1. Add a field to a screen, where your dynamic link will be generated and stored.

URL Field
Adding URL Filed


2. Create a notification Template adding there a link with the content from the field above:

Notification Screen
Referencing a link in the Notification

As a result your notification will get the Link from the field.

Notification with the link
Notification Template with the Link added


All the best,
Sergey.

Acumatica Partner Meeting 2018.

$
0
0
Dear Friends,

Thank you all for participating at our Acumatica Singapore Partner meeting.

What was discussed:

1. Acumatica Branding in Asia Pacific

2. Licensing Changes in version 2018 R2

3. Enterprise and Medium size customer challenges and demands

4. Ways to grow in 2019

5. Enhanced Implementation techniques

Short quiz for the readers. Try to guess who is on the picture :)




All the best,
Sergey.
Viewing all 110 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>