Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

The GetCompanyInfo Method

We modified the GetCompanyInfo method in the following ways:

  1. Add a single, integer (%IntegerOpens in a new tab) input argument, id. This is the object ID of the Company we are looking for.

  2. Change the return type of the method to CInfo.Company as we are returning an object instance from this method.

  3. Add code to the method that opens an object instance (using the %OpenId method) from the database and returns it.

The result looks like this:

Method GetCompanyInfo(id As %Integer) As CInfo.Company [ WebMethod ]
{
    Quit ##class(CInfo.Company).%OpenId(id)
}
FeedbackOpens in a new tab