Tuesday, February 23, 2010

Setting Date Variables to Null in PeopleCode

If you try to assign a date variable a null value you will get an error saying that the left and right sides of the assignment are not compatible.

For instance, the following PeopleCode would error out:

Local date &myDate;

&myDate = null;

To perform this kind of assignment, you may use the Date function in the following way:


Local date &myDate;

&myDate = Date(0);

Thursday, February 18, 2010

ExcelToCI under HTTPS with SSL certificate errors

One of our customers was trying to use an ExcelToCI template to load data in PeopleSoft environment which could only be accessed through HTTPS. However, as the certificate in the web server was expired, ExcelToCI would error out whenever the user wanted to create a new template or submit the data to the database.

Obviously, this issue would have been solved by simply renewing the web server certificate, but the customer was not in a position to do this now and we had to seek an alternative solution.

Our solution was to modify the ExcelToCI macros to tell them to ignore SSL certificate errors. To do so, we had to do the following changes on the CreateCITemplate.sendSOAPRequest_GetCIShape() and StagingAndSubmission.sendSOAPRequest_SubmitToDB() functions:
  • Replace the following variable declaration:
Dim xHTTP As XMLHTTP

by

Dim xHTTP As New MSXML2.ServerXMLHTTP40
  • Replace the following variable initialization:
Set xHTTP = New XMLHTTP

by

Set xHTTP = New MSXML2.ServerXMLHTTP40

  • Add the following line before calling the Send method:
xHTTP.setOption 2, 13056 'Ignore all SSL errors


The SetOption call is actually telling the Send method to ignore any SSL certificate error.