Using the DeleteObject Web Method
3 min
deletes the specified business object record request syntax frsheatintegrationdeleteboresponse deleteobject(string sessionkey, string tenantid, objectcommanddata commanddata) parameters sessionkey the session key from the connect web method tenantid the tenant for which the session key is authenticated commanddata a structure containing information about the creation request return value frsheatintegrationdeleteboresponse object, defined as follows public class { public string status { get; set; } public string exceptionreason { get; set; } } the frsheatintegrationdeleteboresponse class has the following fields status provides a status about the state of the connection the table below contains a full description of the available status values exceptionreason contains exception information, if the application throws an exception when running this web method the following table lists the available status values and describes how to interpret them status explanation success successfully deleted the business object record this web method also returns a status of success if it cannot find the specified record in the tenant error cannot delete the business object record typically the error occurs if the specified business object does not exist in the application the message is definition for business object \<businessobject># was not found ensure that the specified business object exists in the tenant example the following example deletes the incident record with the specified recid objectcommanddata data = new objectcommanddata(); data objecttype = "incident#"; data objectid = "96f889a8ce6e4f9c8b3a99852f788670"; frsheatintegrationdeleteboresponse response = frsvc deleteobject(authsessionkey, tenantid, data); if (response status != "success") { console writeline("ran into the following error when deleting the record " + response exceptionreason); }
