blog

CContact.NewAddress(string purpose) behavior

One would think that calling CContact.NewAddress("somePurpose") would give you a CAddress with the purpose you specified.  However, that is not the case.  The following NUnit demo passes:

[Test, Explicit("Just a demonstration of weird iMIS behavior.")]
public void Demo_NewAddressDoesNotSetPurpose()
{
    var imisContact = new CContact(user)
    {
        Prefix = Prefix,
        FirstName = FirstName,
        MiddleName = MiddleName,
        LastName = LastName,
        Suffix = Suffix
    };

    var address = imisContact.NewAddress(TestAddressPurpose);
    var actualPurpose = address.AddressPurpose;
    Assert.IsEmpty(actualPurpose);
}

Public View, WCM & Communities

I would like to implement WCM/Communties only while maintaining the Public view?  Has anyone done this before? 

Anna

 

 

 

Some questions about var entityService = new EntityManager

 Some variations on a failed theme.

 

 

 //var entityService = new EntityManager(new Uri("https://win2k8/iMIS15"), "manager", "manager", EndpointType.NetTcp);

 

 

//var entityService = new EntityManager(new Uri("net.tcp://localhost:16000"), "manager", "manager", EndpointType.NetTcp); 

adding an image to an IC post

Here's how to illustrate an iMIS Community post; I'm not sure if it's noted elsewhere.

First, create your new post.  Scroll to the bottom and click "File attachments", which expands to show a file path entry field and Browse and Attach buttons.  Click Browse, find the image you want, and click Attach.  After the file is uploaded, under the Description there's a URL string in very small font.  Copy the URL, then in the editor toolbar, click the Insert/Edit image icon (next to the Anchor).  In the popup, paste in the URL, then tab out of the field; if all is well, you'll see your picture in the preview.  Click OK.

WCM Gallery Templates not displaying interior content correctly

There seems to be an issue with some of the WCM templates from the Template Gallery in that they don't display interior content correctly.  Templates that behave properly are 1501, 1502 and 1506 but we'd like to use 1503.

15.1.3.6699

The body of text for the interior pages is presented as 'aligned left' but the left margin is displayed about halfway through content area.  Screenshot attached.

Asi.iBO.Errors.CErrors.NewError may throw

Since this doesn't seem to be documented anywhere online (particularly in the API documentation), it is worth noting that CErrors.NewError will throw an exception if the ThrowExceptionOnError property of the associated IiMISUser object is set to true (assuming you are creating an Error and not a Warning).  In this case, it will always throw and never return.  At least that's what I gather from digging around in reflector:

Raiser's Edge Conversion (pdf files)

Has anyone converted pdf files from Raiser's Edge to iMIS 15?

I have been told the pdf files are actually stored in the RE database.

Any assistance would be appreciated!

Unexpected CPayment behavior

This NUnit TestFixture demonstrates some unexpected behavior in CPayments.  Note that you will need to alter or provide some of the values to run on your machine, if you so choose, but I think you can see by reading this some gotchas to look out for:

using System;
using System.Configuration;

using Asi.iBO;
using Asi.iBO.Financials;
using NUnit.Framework;

namespace Crown.Imis.IntegrationTests
{
    [TestFixture, Explicit("demos")]
    public class CPaymentGotchaDemonstrations
    {
        [TestFixtureSetUp]
        public void TestFixtureSetUp()
        {
            iboAdmin.InitializeSystem(ConfigurationManager.ConnectionStrings["DataSource.iMIS.Connection"].ConnectionString);
        }

        [Test]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void Demo_Setting_CreditCardNumber_toVisaTestNumberAfterSetting_CashAccountCode_CausesUnhandledException()
        {
            var payment = new CPayment(CStaffUser.GetDefaultStaffUser())
            {
                CashAccountCode = "VISA",
                CreditCardNumber = "4007000000027"  // VISA test number, eh?
            };
        }

        [Test]
        [ExpectedException(typeof(Asi.iBO.InvalidCardNumberException))]
        public void Demo_Setting_CreditCardNumber_to011201539123After_CashAccountCode_Causes_InvalidCardNumberException()
        {
            var payment = new CPayment(CStaffUser.GetDefaultStaffUser())
            {
                CashAccountCode = "VISA",
                CreditCardNumber = "011201539123"   // it's irrelevant how I came up with this number.  No idea yet on what is wrong with it.
            };
        }

        [Test]
        public void Demo_Setting_PaymentType_After_CreditCardNumber_Clears_CreditCardNumber()
        {
            var payment = new CPayment(CStaffUser.GetDefaultStaffUser())
            {
                CreditCardNumber = "4007000000027", // VISA test number
                PaymentType = EnumPaymentType.Check
            };

            Assert.IsNullOrEmpty(payment.CreditCardNumber);
        }

        [Test]
        public void Demo_SettingCashAccountCodeChangesPaymentTypeToCreditWhenCashAccountIsCreditType()
        {
            var payment = new CPayment(CStaffUser.GetDefaultStaffUser());
            payment.PaymentType = EnumPaymentType.Check;
            payment.CashAccountCode = "VISA";

            Assert.AreEqual(EnumPaymentType.CreditCard, payment.PaymentType);
        }
    }
}

Blog interrupted by newly discovered shortcut

Last Friday, I had started to blog about a couple of new shortcuts I learned of on Lifehacker.com.  Just before posting, I accidentally discovered another one that blew away the content of my post.

In Windows Explorer (Vista and 7):

  • Rename Files Fast with the Tab Key - I started using this with file preview to quickly rename scanned files that the scanner delivers as datestamp.pdf.  This method also helps overcome the frustion of delays when trying to right-click to rename files on far-remote mapped drives or WebDAV drives.
  • Rename Windows Files in Bulk  - I was happy to find this.  Not too long ago, I resorted to a batch file to do a very similar rename.

Also be sure to check out The Best New Windows 7 Keyboard Shortcuts

Using a Query as a source for IQA

I have a client who wants a list of a particular member type (REG) who reside in Canada or in Washington State.

This is really easy to do with SQL: SELECT Full_Name, ID, State_Province, Country, Member_Type FROM Name WHERE STATE_PROVINCE = 'WA' OR COUNTRY = 'Canada'

I tried using IQA in the following ways:

  1. Create a query where I use the CsContact BO and Filter Member Type = "Regular" AND State Province = "Washington" OR Member Type = "Regular" AND Country = "Canada" Depending on the order, I either get all Washington or All Canada, but never both.  If I try Member Type = "Regular" and State Province = "Washington" or Country = "Canada" I get the same results, depending on the order
     
  2. I tried creating two queries - one where Member Type = "Regular" and Country = "Canada" and one where Member Type = "Regular" and State Province = "Washington" then used left outer joins to the CsContact BO for each of them, but got multiple lines for each result and only ID numbers, no other fields
     
  3. I created a query to just show Member Type = "Regular" and then used it as my source for a query where Country = "Canada" or State Province = "Washington" and was able to get only Canada and Washington but for every member type.

The only solution I could find was to use State Province and select all the Canadian provinces as well as Washington.  This works for now, but in the future they will be asking me for this type of thing again and it may not be possible to make the filtering selections from one field.  Did I do something wrong with my joins or my filters?

Syndicate content