Balíček skriptů - Balíček skriptů - Řádky

Tato data jsou dostupná pouze z scriptpackages/rows.

Metadata - Perzistentní položky

Compiled boolean

Zkompilováno, pouze pro čtení, pole vlastněné tabulkou, možné řadit a filtrovat, pole je duplikováno při klonování objektu

CompiledScriptData string

Zkompilovaný skript, pole vlastněné tabulkou, možné řadit a filtrovat, pole je duplikováno při klonování objektu

CompilerVersion integer

Zkompilováno, pouze pro čtení, pole vlastněné tabulkou, možné řadit a filtrovat, pole je duplikováno při klonování objektu

ObjVersion integer

Verze objektu, pouze pro čtení, pole vlastněné tabulkou, možné řadit a filtrovat, pole nepodporuje ochranu dat/GDPR

Parent_ID string (scriptpackage) relace

Vlastník; ID objektu Balíček skriptů, pouze pro čtení, pole vlastněné tabulkou, možné řadit a filtrovat, pole je odkazem na vlastníka objektu, pole nepodporuje ochranu dat/GDPR

PosIndex integer

Pořadí, pole vlastněné tabulkou, možné řadit a filtrovat, pole je duplikováno při klonování objektu, pole nepodporuje ochranu dat/GDPR

ScriptData string (0)

Skript, pole vlastněné tabulkou, možné řadit a filtrovat, pole je duplikováno při klonování objektu

ScriptID string (30)

ID skriptu, pole vlastněné tabulkou, možné řadit a filtrovat, pole je duplikováno při klonování objektu

ScriptKind integer

Druh skriptu, pole vlastněné tabulkou, možné řadit a filtrovat, pole je duplikováno při klonování objektu

Metadata - Neperzistentní položky

ClassID string (26)

ID třídy, pouze pro čtení, fkAnsiCaseSensitive, pole nepodporuje ochranu dat/GDPR

DisplayName string (100)

Název, pouze pro čtení

ID string (10)

Vlastní ID, pouze pro čtení, fkAnsiCaseSensitive, pole nepodporuje ochranu dat/GDPR

Příklady
Request

GET

https://atd.abra.eu/demodata/scriptpackages/{id}/rows?take=1

GET

https://atd.abra.eu/demodata/scriptpackages/{id}/rows/{id}
Response
{
    "ID": "1110000101",
    "ObjVersion": 1,
    "Parent_ID": "1110000101",
    "PosIndex": 1,
    "ScriptKind": 0,
    "ScriptID": "api",
    "ScriptData": "function POST_ImportIssuedOrderToReceiptCard(AContext: TNxContext; AInput: TJSONSuperObject; APath: String): TJSONSuperObject;\r\nvar\r\n  mSelectedRows: TJSONSuperObjectArray;\r\n  mSelectedRow, mOutputRow: TJSONSuperObject;\r\n  mDocumentImportManager: TNxDocumentImportManager;\r\n  mInputParams: TNxParameters;\r\n  mRows: TNxCustomBusinessMonikerCollection;\r\n  mReceiptCard, mRow: TNxCustomBusinessObject;\r\n  i, mQuantity: Integer;\r\nbegin\r\n  Result := TJSONSuperObject.Create;\r\n  Result.O['rows'] := Result.CreateJSONArray;\r\n\r\n  mDocumentImportManager := NxCreateDocumentImportManager(AContext.GetObjectSpace, Class_IssuedOrder, Class_ReceiptCard);\r\n  mDocumentImportManager.AddInputDocument(AInput.S('inputDocument_id'));\r\n\r\n  mInputParams := TNxParameters.Create;\r\n  mInputParams.GetOrCreateParam(dtString, 'DocQueue_ID').AsString := AInput.S('docQueue_id');\r\n\r\n  if AInput.N['selectedRows'].DataType = jtArray then begin\r\n    mSelectedRows := AInput.A('selectedRows');\r\n    if mSelectedRows.Length > 0 then begin\r\n      mInputParams.GetOrCreateParam(dtString, 'SelectedRows').AsString := ConcatFieldFrom('row_id', mSelectedRows);\r\n    end;\r\n  end;\r\n\r\n  mDocumentImportManager.LoadParams(mInputParams);\r\n  mDocumentImportManager.Execute;\r\n\r\n  mReceiptCard := mDocumentImportManager.OutputDocument;\r\n\r\n  Result.S['ID'] := mReceiptCard.GetFieldValueAsString('ID');\r\n\r\n  mRows := mReceiptCard.GetLoadedCollectionMonikerForFieldCode(mDocumentImportManager.OutputDocument.GetFieldCode('Rows'));\r\n  for i := 0 to mRows.Count - 1 do\r\n  begin\r\n    mRow := mRows.BusinessObject[i];\r\n\r\n    mOutputRow := TJSONSuperObject.Create;\r\n    mOutputRow.S['outputRow_id'] := mRow.getFieldValueAsString('id');\r\n\r\n    if (mSelectedRows <> nil) and (mSelectedRows.Length > 0) then begin\r\n      mQuantity := mSelectedRows.O[i].I['quantity'];\r\n      mRow.SetFieldValueAsInteger('quantity', mQuantity);\r\n\r\n      mOutputRow.S['inputRow_id'] := mSelectedRows.O[i].S['row_id'];\r\n    end;\r\n    mOutputRow.i['quantity'] := mRow.getFieldValueAsInteger('quantity');\r\n\r\n    Result.A['rows'].Add(mOutputRow);\r\n  end;\r\n\r\n  mDocumentImportManager.OutputDocument.Save;\r\n  Result.S['displayName'] := mReceiptCard.GetFieldValueAsString('DisplayName');\r\nend;\r\n\r\nfunction ConcatFieldFrom(AField: String; AJsonArray: TJSONSuperObjectArray): String;\r\nvar\r\n  i: Integer;\r\nbegin\r\n  Result := '';\r\n  for i := 0 to AJsonArray.Length - 1 do begin\r\n    Result := Result + AJsonArray.O[i].S['row_id'] + #13#10;\r\n  end;\r\nend;\r\n\r\n\r\n\r\nfunction POST_ImportPriceListFromCSV(AContext: TNxContext; AInput: String; APath: String): String;\r\nvar\r\n  mPriceList, mStorePrice, mStorePriceRow: TNxCustomBusinessObject;\r\n  mStorePriceRows: TNxCustomBusinessMonikerCollection;\r\n  mRows, mColumns: TStringList;\r\n  mStoreCardId: String;\r\n  mRowIndex, mColumnIndex: Integer;\r\nbegin\r\n  mRows := TStringList.Create;\r\n  mRows.Text := AInput;\r\n\r\n  mColumns := Columns(mRows[0]);\r\n  mPriceList := AContext.GetObjectSpace.CreateObject(Class_PriceList);\r\n  mPriceList.New;\r\n  mPriceList.SetFieldValueAsString('name', mColumns[0]);\r\n  mPriceList.SetFieldValueAsString('code', mColumns[1]);\r\n  mPriceList.Save;\r\n\r\n  mRowIndex := 1;\r\n  While mRowIndex < mRows.Count do begin\r\n    mColumns := Columns(mRows[mRowIndex]);\r\n    mStoreCardId := mColumns[0];\r\n\r\n    mStorePrice := AContext.GetObjectSpace.CreateObject(Class_StorePrice);\r\n    mStorePrice.New;\r\n    mStorePrice.SetFieldValueAsString('pricelist_id', mPriceList.GetFieldValueAsString('ID'));\r\n    mStorePrice.SetFieldValueAsString('storecard_id', mStoreCardId);\r\n\r\n    mStorePriceRows := mStorePrice.GetCollectionMonikerForFieldCode(mStorePrice.GetFieldCode('priceRows'));\r\n    While mColumns[0] = mStoreCardId do begin\r\n      mStoreCardId := mColumns[0];\r\n\r\n      mStorePriceRow := AContext.GetObjectSpace.CreateObject(Class_StorePriceRow);\r\n      mStorePriceRow.New;\r\n      mStorePriceRow.SetFieldValueAsString('price_id', mColumns[1]);\r\n      mStorePriceRow.SetFieldValueAsInteger('amount', StrToInt(mColumns[2]));\r\n      mStorePriceRow.SetFieldValueAsString('qunit', 'ks');\r\n      mStorePriceRow.SetFieldValueAsInteger('unitRate', 1);\r\n      mStorePriceRows.AddObject(mStorePriceRow);\r\n\r\n      mRowIndex := mRowIndex + 1;\r\n      if mRowIndex = mRows.Count then begin\r\n        Break;\r\n      end;\r\n\r\n      mColumns := Columns(mRows[mRowIndex]);\r\n    end;\r\n\r\n    mStorePrice.Save;\r\n  end;\r\n\r\n  Result := 'OK';\r\nend;\r\n\r\nfunction Columns(ARow: String): TStringList;\r\nbegin\r\n  Result := TStringList.Create;\r\n  Result.Delimiter := ';';\r\n  Result.DelimitedText := ARow;\r\nend;\r\n\r\nbegin\r\nend.",
    "CompiledScriptData": "UENLAHjarR1rcxy37a9k1JmqnU6r5Zs8O+6kdtNRm9pu5OmXfMhcdBvnGulOvUfi\/PuSy90lCJC7e0q\/xDoCCxIPEiAIMi\/\/\/Onx4bOf2sNxu999fsX+1Fz9+dXLp8P+42H9+Orl9+fd\/clDPnvaHz10xa5evdytH9vPTu2n0+dX79\/dffj29vFpfzjdHo\/ndvPusGkPH\/Zft\/ft9un0en3YXA2fSnV14ymvPd325PsD7a9e\/rQ+jL+1\/73dtLtT38kXr\/e78NdISclA6fTL0zCMD28\/YRytA86Np5sR1xYTv909ndNnhpD++927t3fnp\/bw7rv\/tPcJ0\/FiB07iDt6vTz+krxyif3c6bHcfRzhrTCJ7k4S1bEyMd1yPwxErgUbzeNc++C\/azdf7n49XAxbTM1x\/cTisfxnRhSuwLif7uhqQWGcFGdq788mrAC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vP1\/d7M36BkrOm4hc+JNn7Pk94TbQgHEWGaA9bkwTbZPQQMjt6z6tp4PQ3cwc1EFr0f7cyDVx2WK177G0Hf+Sjzx6FtKE+9\/DoKY8SHM+rDkTdisvrIXwClx9hYf6yVU8d3qSl1jrKQXZvJyApClpspxUj6buA3EChoj2DqM4nPGHqEGSOT5dvez30daNyzk9WR4QzN0DKZrAhINNWVjuICPNtoTVzdAGOjT+w25I3dZuaR3ab2mDBv4GvCvIlHPbnTevePa0Cofla3tEiThZedcK1\/ZrQBoViS2UPgS+pcxKd+s9JG4Cs8nE9W+QcM+IZ29TV1UoEVvoxhQGFp4bL8DjQnD65yNaM9VdWeyrSncNVQjzBTSBawyPsw+TOgkfSlT0Frwqme4VSTaztv2oft4\/aUQi+ua3mdAIJPNut4\/yM35hfXgBDXNVumzJAHXOk7YIgZU2VmA4rkAh4XFYYMXKhDh4yMAS\/Ume2bebXVZ23BqMPjWMNcOga6w\/8A4n+0vD9J",
    "Compiled": true,
    "CompilerVersion": 1
}
Request POST

POST

https://atd.abra.eu/demodata/query
{"class": "MHKLQWNHX33OVDC4WBG2YGDG0K", "take": "1"}
Response
{
    "ID": "1110000101",
    "ObjVersion": 1,
    "Parent_ID": "1110000101",
    "PosIndex": 1,
    "ScriptKind": 0,
    "ScriptID": "api",
    "ScriptData": "function POST_ImportIssuedOrderToReceiptCard(AContext: TNxContext; AInput: TJSONSuperObject; APath: String): TJSONSuperObject;\r\nvar\r\n  mSelectedRows: TJSONSuperObjectArray;\r\n  mSelectedRow, mOutputRow: TJSONSuperObject;\r\n  mDocumentImportManager: TNxDocumentImportManager;\r\n  mInputParams: TNxParameters;\r\n  mRows: TNxCustomBusinessMonikerCollection;\r\n  mReceiptCard, mRow: TNxCustomBusinessObject;\r\n  i, mQuantity: Integer;\r\nbegin\r\n  Result := TJSONSuperObject.Create;\r\n  Result.O['rows'] := Result.CreateJSONArray;\r\n\r\n  mDocumentImportManager := NxCreateDocumentImportManager(AContext.GetObjectSpace, Class_IssuedOrder, Class_ReceiptCard);\r\n  mDocumentImportManager.AddInputDocument(AInput.S('inputDocument_id'));\r\n\r\n  mInputParams := TNxParameters.Create;\r\n  mInputParams.GetOrCreateParam(dtString, 'DocQueue_ID').AsString := AInput.S('docQueue_id');\r\n\r\n  if AInput.N['selectedRows'].DataType = jtArray then begin\r\n    mSelectedRows := AInput.A('selectedRows');\r\n    if mSelectedRows.Length > 0 then begin\r\n      mInputParams.GetOrCreateParam(dtString, 'SelectedRows').AsString := ConcatFieldFrom('row_id', mSelectedRows);\r\n    end;\r\n  end;\r\n\r\n  mDocumentImportManager.LoadParams(mInputParams);\r\n  mDocumentImportManager.Execute;\r\n\r\n  mReceiptCard := mDocumentImportManager.OutputDocument;\r\n\r\n  Result.S['ID'] := mReceiptCard.GetFieldValueAsString('ID');\r\n\r\n  mRows := mReceiptCard.GetLoadedCollectionMonikerForFieldCode(mDocumentImportManager.OutputDocument.GetFieldCode('Rows'));\r\n  for i := 0 to mRows.Count - 1 do\r\n  begin\r\n    mRow := mRows.BusinessObject[i];\r\n\r\n    mOutputRow := TJSONSuperObject.Create;\r\n    mOutputRow.S['outputRow_id'] := mRow.getFieldValueAsString('id');\r\n\r\n    if (mSelectedRows <> nil) and (mSelectedRows.Length > 0) then begin\r\n      mQuantity := mSelectedRows.O[i].I['quantity'];\r\n      mRow.SetFieldValueAsInteger('quantity', mQuantity);\r\n\r\n      mOutputRow.S['inputRow_id'] := mSelectedRows.O[i].S['row_id'];\r\n    end;\r\n    mOutputRow.i['quantity'] := mRow.getFieldValueAsInteger('quantity');\r\n\r\n    Result.A['rows'].Add(mOutputRow);\r\n  end;\r\n\r\n  mDocumentImportManager.OutputDocument.Save;\r\n  Result.S['displayName'] := mReceiptCard.GetFieldValueAsString('DisplayName');\r\nend;\r\n\r\nfunction ConcatFieldFrom(AField: String; AJsonArray: TJSONSuperObjectArray): String;\r\nvar\r\n  i: Integer;\r\nbegin\r\n  Result := '';\r\n  for i := 0 to AJsonArray.Length - 1 do begin\r\n    Result := Result + AJsonArray.O[i].S['row_id'] + #13#10;\r\n  end;\r\nend;\r\n\r\n\r\n\r\nfunction POST_ImportPriceListFromCSV(AContext: TNxContext; AInput: String; APath: String): String;\r\nvar\r\n  mPriceList, mStorePrice, mStorePriceRow: TNxCustomBusinessObject;\r\n  mStorePriceRows: TNxCustomBusinessMonikerCollection;\r\n  mRows, mColumns: TStringList;\r\n  mStoreCardId: String;\r\n  mRowIndex, mColumnIndex: Integer;\r\nbegin\r\n  mRows := TStringList.Create;\r\n  mRows.Text := AInput;\r\n\r\n  mColumns := Columns(mRows[0]);\r\n  mPriceList := AContext.GetObjectSpace.CreateObject(Class_PriceList);\r\n  mPriceList.New;\r\n  mPriceList.SetFieldValueAsString('name', mColumns[0]);\r\n  mPriceList.SetFieldValueAsString('code', mColumns[1]);\r\n  mPriceList.Save;\r\n\r\n  mRowIndex := 1;\r\n  While mRowIndex < mRows.Count do begin\r\n    mColumns := Columns(mRows[mRowIndex]);\r\n    mStoreCardId := mColumns[0];\r\n\r\n    mStorePrice := AContext.GetObjectSpace.CreateObject(Class_StorePrice);\r\n    mStorePrice.New;\r\n    mStorePrice.SetFieldValueAsString('pricelist_id', mPriceList.GetFieldValueAsString('ID'));\r\n    mStorePrice.SetFieldValueAsString('storecard_id', mStoreCardId);\r\n\r\n    mStorePriceRows := mStorePrice.GetCollectionMonikerForFieldCode(mStorePrice.GetFieldCode('priceRows'));\r\n    While mColumns[0] = mStoreCardId do begin\r\n      mStoreCardId := mColumns[0];\r\n\r\n      mStorePriceRow := AContext.GetObjectSpace.CreateObject(Class_StorePriceRow);\r\n      mStorePriceRow.New;\r\n      mStorePriceRow.SetFieldValueAsString('price_id', mColumns[1]);\r\n      mStorePriceRow.SetFieldValueAsInteger('amount', StrToInt(mColumns[2]));\r\n      mStorePriceRow.SetFieldValueAsString('qunit', 'ks');\r\n      mStorePriceRow.SetFieldValueAsInteger('unitRate', 1);\r\n      mStorePriceRows.AddObject(mStorePriceRow);\r\n\r\n      mRowIndex := mRowIndex + 1;\r\n      if mRowIndex = mRows.Count then begin\r\n        Break;\r\n      end;\r\n\r\n      mColumns := Columns(mRows[mRowIndex]);\r\n    end;\r\n\r\n    mStorePrice.Save;\r\n  end;\r\n\r\n  Result := 'OK';\r\nend;\r\n\r\nfunction Columns(ARow: String): TStringList;\r\nbegin\r\n  Result := TStringList.Create;\r\n  Result.Delimiter := ';';\r\n  Result.DelimitedText := ARow;\r\nend;\r\n\r\nbegin\r\nend.",
    "CompiledScriptData": "UENLAHjarR1rcxy37a9k1JmqnU6r5Zs8O+6kdtNRm9pu5OmXfMhcdBvnGulOvUfi\/PuSy90lCJC7e0q\/xDoCCxIPEiAIMi\/\/\/Onx4bOf2sNxu999fsX+1Fz9+dXLp8P+42H9+Orl9+fd\/clDPnvaHz10xa5evdytH9vPTu2n0+dX79\/dffj29vFpfzjdHo\/ndvPusGkPH\/Zft\/ft9un0en3YXA2fSnV14ymvPd325PsD7a9e\/rQ+jL+1\/73dtLtT38kXr\/e78NdISclA6fTL0zCMD28\/YRytA86Np5sR1xYTv909ndNnhpD++927t3fnp\/bw7rv\/tPcJ0\/FiB07iDt6vTz+krxyif3c6bHcfRzhrTCJ7k4S1bEyMd1yPwxErgUbzeNc++C\/azdf7n49XAxbTM1x\/cTisfxnRhSuwLif7uhqQWGcFGdq788mrACJxs0wLsjcqNBRFh\/Jmf39+9L+jrf5zvVt\/bA9XAzpX1KCmv1Cs0K+m\/XbW9T6ocZC27kWQ9\/Z+1PSIJppCF4Z2ATRpVrYwM87H0\/7xL+fjdtcej\/\/c77Y\/tofX+4egGz+zx0+lLPRnC\/2RuW1LWk36tCvO5oaVqdWGNYCOxZGxbK8GiCT9\/+u83p22p19GFCL2W79iJJ26FQcCuN97tZ93m+Pp8dTPrqZb\/NbH4\/bjDjSzblSb48dd1rDbb4Z+vm6P54dxkvo1oOsmfPHqZfvp6TACmOiQWCSiMVmG6NaWAbbiXRcA9fWhXZ\/ahCA0GMNNGI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8DjQnD65yNaM9VdWeyrSncNVQjzBTSBawyPsw+TOgkfSlT0Frwqme4VSTaztv2oft4\/aUQi+ua3mdAIJPNut4\/yM35hfXgBDXNVumzJAHXOk7YIgZU2VmA4rkAh4XFYYMXKhDh4yMAS\/Ume2bebXVZ23BqMPjWMNcOga6w\/8A4n+0vD9J",
    "Compiled": true,
    "CompilerVersion": 1
}
Request

PUT

https://atd.abra.eu/demodata/scriptpackages/{id}/rows/{id}?select=id
Body
{
    "CompiledScriptData": "UENLAHjarR1rcxy37a9k1JmqnU6r5Zs8O+6kdtNRm9pu5OmXfMhcdBvnGulOvUfi\/PuSy90lCJC7e0q\/xDoCCxIPEiAIMi\/\/\/Onx4bOf2sNxu999fsX+1Fz9+dXLp8P+42H9+Orl9+fd\/clDPnvaHz10xa5evdytH9vPTu2n0+dX79\/dffj29vFpfzjdHo\/ndvPusGkPH\/Zft\/ft9un0en3YXA2fSnV14ymvPd325PsD7a9e\/rQ+jL+1\/73dtLtT38kXr\/e78NdISclA6fTL0zCMD28\/YRytA86Np5sR1xYTv909ndNnhpD++927t3fnp\/bw7rv\/tPcJ0\/FiB07iDt6vTz+krxyif3c6bHcfRzhrTCJ7k4S1bEyMd1yPwxErgUbzeNc++C\/azdf7n49XAxbTM1x\/cTisfxnRhSuwLif7uhqQWGcFGdq788mrACJxs0wLsjcqNBRFh\/Jmf39+9L+jrf5zvVt\/bA9XAzpX1KCmv1Cs0K+m\/XbW9T6ocZC27kWQ9\/Z+1PSIJppCF4Z2ATRpVrYwM87H0\/7xL+fjdtcej\/\/c77Y\/tofX+4egGz+zx0+lLPRnC\/2RuW1LWk36tCvO5oaVqdWGNYCOxZGxbK8GiCT9\/+u83p22p19GFCL2W79iJJ26FQcCuN97tZ93m+Pp8dTPrqZb\/NbH4\/bjDjSzblSb48dd1rDbb4Z+vm6P54dxkvo1oOsmfPHqZfvp6TACmOiQWCSiMVmG6NaWAbbiXRcA9fWhXZ\/ahCA0GMNNGIT\/J7FWYJNjNvk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WeyrSncNVQjzBTSBawyPsw+TOgkfSlT0Frwqme4VSTaztv2oft4\/aUQi+ua3mdAIJPNut4\/yM35hfXgBDXNVumzJAHXOk7YIgZU2VmA4rkAh4XFYYMXKhDh4yMAS\/Ume2bebXVZ23BqMPjWMNcOga6w\/8A4n+0vD9J",
    "PosIndex": 1,
    "ScriptData": "function POST_ImportIssuedOrderToReceiptCard(AContext: TNxContext; AInput: TJSONSuperObject; APath: String): TJSONSuperObject;\r\nvar\r\n  mSelectedRows: TJSONSuperObjectArray;\r\n  mSelectedRow, mOutputRow: TJSONSuperObject;\r\n  mDocumentImportManager: TNxDocumentImportManager;\r\n  mInputParams: TNxParameters;\r\n  mRows: TNxCustomBusinessMonikerCollection;\r\n  mReceiptCard, mRow: TNxCustomBusinessObject;\r\n  i, mQuantity: Integer;\r\nbegin\r\n  Result := TJSONSuperObject.Create;\r\n  Result.O['rows'] := Result.CreateJSONArray;\r\n\r\n  mDocumentImportManager := NxCreateDocumentImportManager(AContext.GetObjectSpace, Class_IssuedOrder, Class_ReceiptCard);\r\n  mDocumentImportManager.AddInputDocument(AInput.S('inputDocument_id'));\r\n\r\n  mInputParams := TNxParameters.Create;\r\n  mInputParams.GetOrCreateParam(dtString, 'DocQueue_ID').AsString := AInput.S('docQueue_id');\r\n\r\n  if AInput.N['selectedRows'].DataType = jtArray then begin\r\n    mSelectedRows := AInput.A('selectedRows');\r\n    if mSelectedRows.Length > 0 then begin\r\n      mInputParams.GetOrCreateParam(dtString, 'SelectedRows').AsString := ConcatFieldFrom('row_id', mSelectedRows);\r\n    end;\r\n  end;\r\n\r\n  mDocumentImportManager.LoadParams(mInputParams);\r\n  mDocumentImportManager.Execute;\r\n\r\n  mReceiptCard := mDocumentImportManager.OutputDocument;\r\n\r\n  Result.S['ID'] := mReceiptCard.GetFieldValueAsString('ID');\r\n\r\n  mRows := mReceiptCard.GetLoadedCollectionMonikerForFieldCode(mDocumentImportManager.OutputDocument.GetFieldCode('Rows'));\r\n  for i := 0 to mRows.Count - 1 do\r\n  begin\r\n    mRow := mRows.BusinessObject[i];\r\n\r\n    mOutputRow := TJSONSuperObject.Create;\r\n    mOutputRow.S['outputRow_id'] := mRow.getFieldValueAsString('id');\r\n\r\n    if (mSelectedRows <> nil) and (mSelectedRows.Length > 0) then begin\r\n      mQuantity := mSelectedRows.O[i].I['quantity'];\r\n      mRow.SetFieldValueAsInteger('quantity', mQuantity);\r\n\r\n      mOutputRow.S['inputRow_id'] := mSelectedRows.O[i].S['row_id'];\r\n    end;\r\n    mOutputRow.i['quantity'] := mRow.getFieldValueAsInteger('quantity');\r\n\r\n    Result.A['rows'].Add(mOutputRow);\r\n  end;\r\n\r\n  mDocumentImportManager.OutputDocument.Save;\r\n  Result.S['displayName'] := mReceiptCard.GetFieldValueAsString('DisplayName');\r\nend;\r\n\r\nfunction ConcatFieldFrom(AField: String; AJsonArray: TJSONSuperObjectArray): String;\r\nvar\r\n  i: Integer;\r\nbegin\r\n  Result := '';\r\n  for i := 0 to AJsonArray.Length - 1 do begin\r\n    Result := Result + AJsonArray.O[i].S['row_id'] + #13#10;\r\n  end;\r\nend;\r\n\r\n\r\n\r\nfunction POST_ImportPriceListFromCSV(AContext: TNxContext; AInput: String; APath: String): String;\r\nvar\r\n  mPriceList, mStorePrice, mStorePriceRow: TNxCustomBusinessObject;\r\n  mStorePriceRows: TNxCustomBusinessMonikerCollection;\r\n  mRows, mColumns: TStringList;\r\n  mStoreCardId: String;\r\n  mRowIndex, mColumnIndex: Integer;\r\nbegin\r\n  mRows := TStringList.Create;\r\n  mRows.Text := AInput;\r\n\r\n  mColumns := Columns(mRows[0]);\r\n  mPriceList := AContext.GetObjectSpace.CreateObject(Class_PriceList);\r\n  mPriceList.New;\r\n  mPriceList.SetFieldValueAsString('name', mColumns[0]);\r\n  mPriceList.SetFieldValueAsString('code', mColumns[1]);\r\n  mPriceList.Save;\r\n\r\n  mRowIndex := 1;\r\n  While mRowIndex < mRows.Count do begin\r\n    mColumns := Columns(mRows[mRowIndex]);\r\n    mStoreCardId := mColumns[0];\r\n\r\n    mStorePrice := AContext.GetObjectSpace.CreateObject(Class_StorePrice);\r\n    mStorePrice.New;\r\n    mStorePrice.SetFieldValueAsString('pricelist_id', mPriceList.GetFieldValueAsString('ID'));\r\n    mStorePrice.SetFieldValueAsString('storecard_id', mStoreCardId);\r\n\r\n    mStorePriceRows := mStorePrice.GetCollectionMonikerForFieldCode(mStorePrice.GetFieldCode('priceRows'));\r\n    While mColumns[0] = mStoreCardId do begin\r\n      mStoreCardId := mColumns[0];\r\n\r\n      mStorePriceRow := AContext.GetObjectSpace.CreateObject(Class_StorePriceRow);\r\n      mStorePriceRow.New;\r\n      mStorePriceRow.SetFieldValueAsString('price_id', mColumns[1]);\r\n      mStorePriceRow.SetFieldValueAsInteger('amount', StrToInt(mColumns[2]));\r\n      mStorePriceRow.SetFieldValueAsString('qunit', 'ks');\r\n      mStorePriceRow.SetFieldValueAsInteger('unitRate', 1);\r\n      mStorePriceRows.AddObject(mStorePriceRow);\r\n\r\n      mRowIndex := mRowIndex + 1;\r\n      if mRowIndex = mRows.Count then begin\r\n        Break;\r\n      end;\r\n\r\n      mColumns := Columns(mRows[mRowIndex]);\r\n    end;\r\n\r\n    mStorePrice.Save;\r\n  end;\r\n\r\n  Result := 'OK';\r\nend;\r\n\r\nfunction Columns(ARow: String): TStringList;\r\nbegin\r\n  Result := TStringList.Create;\r\n  Result.Delimiter := ';';\r\n  Result.DelimitedText := ARow;\r\nend;\r\n\r\nbegin\r\nend.",
    "ScriptID": "api",
    "ScriptKind": 0
}
Response
{
    "id": "1110000101"
}

DELETE

https://atd.abra.eu/demodata/scriptpackages/{id}/rows/{id}
Response
200 - OK Everything worked as expected.