Monday
hi Team, we have created an action , which incorporates service that is offline enabled as shown below
{
"_Type": "Action.Type.ODataService.CallFunction",
"ActionResult": {
"_Name": "CreateDeliveryDocket_Offline"
},
"Target": {
"Service": "/ABCDSyncApp/Services/**********_Scheduling.service",
"Function": {
"Name": "createDeliveryDocketMDK"
}
}
}Am executing the above action from my rule as shown below. The Payload passed is as shown below now on click of save, the action should store the data locally and sync it with back end when device is connected online.
{
"plantId": "1054",
"plantName": "ABCD Bayswater (1054)",
"deliveryDate": "2026-07-01",
"deliveryTime": "03:14:25",
"soldToId": "2057",
"soldToName1": "DEF GHI LIMESTONE",
"soldToName2": "DEF GHI LIMESTONE",
"shipToId": "2057",
"shipToName1": "DEF GHI LIMESTONE",
"shipToName2": "DEF GHI LIMESTONE",
"custPoNumber": "1234",
"contractNo": "XX98234",
"shotId": "SHOT20260702",
"locationText": "",
"notes": "test",
"vehicleOperators": [
{
"vehicleAvailableId": "*********************eff294e25",
"trailerAvailableId": null,
"staffAvailableIds": [
"*******************426abe05f3"
]
}
],
"products": [
{
"productCode": "*******1001",
"productName": "XXXX-0-XXXXXXX-X0XBX",
"contractItem": "20",
"orderedQty": 10,
"usedQty": 10,
"productUoM": "pc",
"bom": "",
"bundleHeader": "000001",
"bundleHeaderDescription": "GORA 01",
"bundleItem": "000001",
"productHierarchy": "",
"isService": false,
"isBundle": true,
"isBom": false,
"isBatchManaged": true,
"batchCodes": [],
"materials": []
}
],
"services": [
{
"productCode": "1018078",
"productName": "GRINGS;DETENT;MYTON;64;-;76MM",
"contractItem": "3390",
"orderedQty": 0,
"usedQty": 0,
"productUoM": "PC",
"bom": "",
"bundleHeader": "000000",
"bundleHeaderDescription": "",
"bundleItem": "000000",
"productHierarchy": "SV CANTEEN",
"isService": true,
"isBundle": false,
"isBom": false,
"isBatchManaged": false,
"batchCodes": [],
"materials": []
},
{
"productCode": "3126422",
"productName": "CHARGING WODCAMEL 22MM OD",
"contractItem": "7020",
"orderedQty": 0,
"usedQty": 0,
"productUoM": "M",
"bom": "",
"bundleHeader": "000000",
"bundleHeaderDescription": "",
"bundleItem": "000000",
"productHierarchy": "SV CANTEEN",
"isService": true,
"isBundle": false,
"isBom": false,
"isBatchManaged": false,
"batchCodes": [],
"materials": []
}
],
"additional": {
"projectNumber": "898989898989",
"shotType": "Production Blast",
"numberOfOperators": 2,
"benchHeight": 12.5,
"benchHeightUom": "M",
"avgChargingHeight": 10.0,
"avgChargingHeightUom": "M",
"holeDiameter": 115,
"holeDiameterUom": "MM",
"numberOfHoles": 36,
"temperature": 24.5,
"temperatureUom": "C",
"internalNotes": "H stemming applied",
"timeRequired": "07:30",
"labourTime": "06:45",
"delayTime": "00:45",
"timeOutPlant": "05:30",
"timeOnSite": "06:45",
"timeOffSite": "14:30",
"timeInPlant": "15:15",
"mmuLoadTime": "01:00",
"travelTime": "01:15",
"noOfCupWeightsPerMMU": 3,
"cupWeightNotes": "All cup weight readings within acceptable density range",
"cupWeights": [
{ "cupWeightName": "Cup Weight 1", "density": 1.17, "densityUom": "kg/l", "temperature": 24.0, "temperatureUom": "C" },
{ "cupWeightName": "Cup Weight 2", "density": 1.18, "densityUom": "kg/l", "temperature": 24.5, "temperatureUom": "C" },
{ "cupWeightName": "Cup Weight 3", "density": 1.16, "densityUom": "kg/l", "temperature": 25.0, "temperatureUom": "C" }
],
"totalDistance": 145,
"totalDistanceUom": "KM",
"onSiteDistance": 12,
"onSiteDistanceUom": "KM",
"customerLicenceNumber": "Nuiuiui-00234",
"oricaLicenceNumber": "MYTANBA123-A",
"shippersMagazineLicenceNumber": "GRAGASHIP21",
"receiversMagazineLicenceNumber": "GRAGA-RCV-8812",
"location": "TIP B4 - AMERICAN OCEAN",
"density": 1.17,
"densityUom": "kg/l",
"averagePalletHeight": 1.2,
"averagePalletHeightUom": "M",
"aneLoaded": 4800,
"aneLoadedUom": "KG",
"aneUsed": 4620,
"aneUsedUom": "KG",
"anLoaded": 320,
"anLoadedUom": "KG",
"anUsed": 305,
"anUsedUom": "KG",
"roadFuel": 48,
"roadFuelUom": "L",
"processFuel": 165,
"processFuelUom": "L",
"weightIn": 24500,
"weightInUom": "KG",
"weightOut": 19800,
"weightOutUom": "KG",
"grossWeight": 4700,
"grossWeightUom": "KG",
"netWeight": 4630,
"netWeightUom": "KG",
"waste": 70,
"wasteUom": "KG",
"scaleIn": 24480,
"scaleInUom": "KG",
"scaleOut": 19820,
"scaleOutUom": "KG",
"epAneLoaded": 180,
"epAneLoadedUom": "KG",
"bulkMassNotes": "1.5% tolerance",
"additionalNotes": "Customer rep on sitE"
}
};but it is throwing error as below
{"status":{},"error":"Error: [-10440] Unrecognized datatype of parameter \"products\" for action \"createDeliveryDocketMDK\".\n at ODataServiceProvider.toJSError (file:///data/data/com.sap.mobileservices.client/files/app/vendor.js:2:1737430)\n at file:///data/data/com.sap.mobileservices.client/files/app/vendor.js:2:1750507\n at async ExecuteAction (file:///data/data/com.sap.mobileservices.client/files/definitions/bundle.1866.js:11916:20)\n at async Rule.CreateDeliveryDocket [as ruleFunction] (file:///data/data/com.sap.mobileservices.client/files/definitions/bundle.1866.js:10569:26)"}The metadata of the function we are calling is as shown below.
}
<Action Name="createDeliveryDocketMDK" IsBound="false">
<Parameter Name="plantId" Type="Edm.String" MaxLength="4" Nullable="false"/>
<Parameter Name="plantName" Type="Edm.String" MaxLength="200"/>
<Parameter Name="deliveryDate" Type="Edm.Date" Nullable="false"/>
<Parameter Name="deliveryTime" Type="Edm.TimeOfDay"/>
<Parameter Name="soldToId" Type="Edm.String" MaxLength="20" Nullable="false"/>
<Parameter Name="soldToName1" Type="Edm.String" MaxLength="50"/>
<Parameter Name="soldToName2" Type="Edm.String" MaxLength="50"/>
<Parameter Name="shipToId" Type="Edm.String" MaxLength="20" Nullable="false"/>
<Parameter Name="shipToName1" Type="Edm.String" MaxLength="50"/>
<Parameter Name="shipToName2" Type="Edm.String" MaxLength="50"/>
<Parameter Name="custPoNumber" Type="Edm.String" MaxLength="35"/>
<Parameter Name="contractNo" Type="Edm.String" MaxLength="50"/>
<Parameter Name="shotId" Type="Edm.String" MaxLength="20"/>
<Parameter Name="locationText" Type="Edm.String" MaxLength="200"/>
<Parameter Name="notes" Type="Edm.String" MaxLength="500"/>
<Parameter Name="offlineDocketNumber" Type="Edm.String" MaxLength="60"/>
<Parameter Name="operatorSigned" Type="Edm.Boolean"/>
<Parameter Name="operatorSignedTimestamp" Type="Edm.DateTimeOffset" Precision="7"/>
<Parameter Name="operatorSignedBy" Type="Edm.String" MaxLength="80"/>
<Parameter Name="operatorSignature" Type="Edm.String"/>
<Parameter Name="customerSigned" Type="Edm.Boolean"/>
<Parameter Name="customerSignedTimestamp" Type="Edm.DateTimeOffset" Precision="7"/>
<Parameter Name="customerSignedBy" Type="Edm.String" MaxLength="80"/>
<Parameter Name="customerSignature" Type="Edm.String"/>
<Parameter Name="vehicleOperators" Type="Collection(ABCD.schedulingapp_phase2.schedulingService.ABCD_schedulingapp_phase2_VehicleOperatorInput)" Nullable="true"/>
<Parameter Name="products" Type="Collection(ABCD.schedulingapp_phase2.schedulingService.ABCD_schedulingapp_phase2_ProductInput)" Nullable="true"/>
<Parameter Name="services" Type="Collection(ABCD.schedulingapp_phase2.schedulingService.ABCD_schedulingapp_phase2_ProductInput)" Nullable="true"/>
<Parameter Name="additional" Type="ABCD.schedulingapp_phase2.schedulingService.ABCD_schedulingapp_phase2_DocketAdditionalInput"/>
<ReturnType Type="ABCD.schedulingapp_phase2.schedulingService.return_ABCD_schedulingapp_phase2_schedulingService_createDeliveryDocketMDK"/>
</Action>The error specified is :UTC::::::2026-07-06 142820::::IST::::: 2026-07-06 195820 ::::: l_var_result{"status":{},"error":"Error: [-10440] Unrecognized datatype of parameter \"products\" for action \"createDeliveryDocketMDK\".\n at ODataServiceProvider.toJSError (file:///data/data/com.sap.mobileservices.client/files/app/vendor.js:2:1737430)\n at file:///data/data/com.sap.mobileservices.client/files/app/vendor.js:2:1750507\n at async ExecuteAction (file:///data/data/com.sap.mobileservices.client/files/definitions/bundle.1869.js:11899:20)\n at async Rule.CreateDeliveryDocketHD [as ruleFunction] (file:///data/data/com.sap.mobileservices.client/files/definitions/bundle.1869.js:11635:26)"} the feilds The Fields, products, services ,vehicle operators are JSON array, and for these fields, it is throwing error as unrecognized data type parameter. please do the needful.
Regards
Govardan raj
Request clarification before answering.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.