0

what is the code of writing operation code that return table object records ( ex: creating a function that return customer information ). this function will be consume from my application during web service.

[SysEntryPointAttribute(true),
AifCollectionTypeAttribute('return', Types::String)]
public MyCustTable testMethod()
{
   CustTable       custTable;
   List list = new List(Types::String);
   MyCustTable temp;
   while select * from custTable
   {

       temp.Name = custTable.name();
       temp.AccountNum = custTable.AccountNum;
   }

   return temp;

//this is not working find, i wan to return some information related to customer like name, phone, 

}

this function will be consume from my project using c#

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
alhamdi.cs
  • 13
  • 6

1 Answers1

0

You cannot return the record directly, you have to use a specific interface.

AIF service classes usually have these operations:

  • create - inputs: Document object - output: AifEntityKeyList - Takes a document object, creates records in the database, and returns a list of the IDs for the new records.

  • delete - AifEntityKeyList - Nothing - Takes one or more IDs and deletes the specified records from the database.

  • find - AifQueryCriteria - Document object Takes criteria, queries the database for matching records, and returns them in a document object.

  • findKeys - AifQueryCriteria - AifEntityKeyList - Takes criteria, queries the database for matching records, and returns a list of corresponding IDs for those records.

  • read - AifEntityKeyList - Document object - Takes one or more IDs, reads the records from the database, and returns the records.

  • update - AifEntityKeyList and document object - Nothing - Takes one or more IDs and the data that corresponds to those IDs, and then updates the database. For more information, see Updating Data With AIF.

  • getKeys - AifDocumentPaging - AifEntityKeyList - Retrieves the keys for documents based on a document filter. For more information, see Configure processing options.

  • getChangedKeys - AifDocumentPaging, changedDateTime - AifEntityKeyList Retrieves the keys for documents based on a document filter and a date that is passed in. For more information, see Configuring AIF for change tracking.

See how to create an AIF document service.
The service class methods can be created using a wizard.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50