Business object method change question

Hello!

While verifying customizations for our upgrade to 10.2.300.1 from 10.1.400.16, I came across something weird regarding the InvTransfer assembly. This caused me to have to change some method calls in the code.

In the BO reference it changed from this:
void ChangeToBin(
ref InvTransferTableset ds
)
to this:
void ChangeToBin(
string ipToBinNum,
ref InvTransferTableset ds
)

yet in the object explorer it says the method only takes 1 param, a string. So i had to add .ToString on this call to cvhange it from this:
adpInvTran.ChangeToBin(adpInvTran.InvTransferData)

to this:
adpInvTran.ChangeToBin(adpInvTran.InvTransferData.ToString());

Why would the BO Reference be different from the object explorer guide?
What is the point of this change?

Your posting piqued my interest as the BO Reference guide is auto generated and the Object Explorer uses Reflection (live inspection) so there is rarely a difference.

What I found is that both are correct - the difference is that the Object Explorer is working against the UI definition of the Method and the BO Reference guide is going against the Service Interface definition of the Method. In the Epicor UI code, the UI rarely addresses the BO directly. Instead, they address the methods via the Adapter and the Adapter addresses the BO. This allows the coders to extend the BO methods with UI specific logic common to all UIs referencing the BO - the code can be written once but used by all UIs consuming the Method. Search is a prime example - the Search definition is defined in the Adapter and consumed by all UIs that need to provide a Search.

Generally, the Adapter just wraps the BO with some minor extensions like “Before Adapter” and “After Adapter” method call logic for UI Customization and the Adapter Method signature matches that of the BO. In this case, the UI Coder has changed the UI side of the signature and it no longer matches the BO.

This Inventory Transfer functionality and logic has had some fairly significant changes made for the 10.2.300 release and you will need to test any customization made in this area very carefully. Your code change above may compile but it is unlikely to function as you expect. The String parameter on that method is expected to contain the “Target” Bin Reference - not the InvTransfer data set.

It appears that many of the other methods on the InvTransfer adapter have been modified in the same way. In the small number of methods that I looked at, if the BO reference has two parameters and the Object Explorer is telling you it has one, the UI Adapter Method is expecting you to pass the data that matches the same type in the BO reference - in this case “string ipToBinNum”.

You should be able to see this and other BO Reference changes in the Software Interface Change document released with 10.2.300.

2 Likes

Thanks!

That is some very useful information, and I’ll keep this in mind while we move forward with the upgrade.

One other small question Rich…what does the "“ip” in the var names in the documentation stand for? Input? lol

I believe they stand for input parameter just based on context.

1 Like