Thursday, March 31, 2016

Help! My Component Interface Field is Not Updating!!!

In BYU's soon-to-go-live scholarship system I came across a bizarre problem that I was lucky to quickly find a solution for.

It is possible for you to use PeopleCode to tell your component interface to update a field and have it ignore you.  You'd think that PeopleSoft would have made it so that such a situation raises an error, but it doesn't.

Here's what's happening...


In my component interface code, I included the following code block to set the notify date to null and the Y_MTN_MSG_ID to 0 if the letter code being passed in didn't match the current letter code of the scholarship award that I was processing:


I know that it was invoking the code, because I saw this in my log file:

I went back to the Award page for that student, and other fields had been successfully updated, but not these two.  Why was PeopleSoft ignoring my commands to update the notify date and the Y_MTN_MSG_ID?

Because those two fields were not properties in my component interface.  Now that I have added them (see green square in the screen shot below), their values are being successfully updated by my PeopleCode.


One thing that I didn't test is whether I get the same behavior if the field does exist as a property in the CI but its Read Only property is set to "Y". Let me know in the comments below if you know what it does in that situation.

1 comment:

trustno1 said...
This comment has been removed by a blog administrator.