transaction

Set the {@link com.sap.cloud.mobile.kotlin.odata.RequestOptions#changeSet RequestOptions.changeSet} and return this options object.

Example using proxy classes:
open fun transactionExample(patient: Patient): kotlin.Unit
{
    val service = this.healthService;
    val transactionID = GuidValue.random().toString();
    val appointment1 = Appointment();
    appointment1.patient = patient;
    service.createEntity(appointment1, null, RequestOptions()
        .transaction(transactionID));
    val appointment2 = Appointment();
    appointment2.patient = patient;
    service.createEntity(appointment2, null, RequestOptions()
        .transaction(transactionID));
    // Some time later... Upload both appointments in the same backend transaction.
    service.upload();
}

Return

This options object.

Parameters

id

Transaction ID to be copied into {@link com.sap.cloud.mobile.kotlin.odata.RequestOptions#changeSet RequestOptions.changeSet}.