Solved

inserting project tasks under existing project using REST API

  • 28 June 2023
  • 4 replies
  • 122 views

Userlevel 3
Badge

Hey Team 

 

Hope everyone here is doing well

 

i’m trying to create project tasks under existing project using Rest API

 

 

Endpoint : {{baseUrl}}/ProjectTask
Method : PUT

Headers : Content-Type:application/json


Body : 

 

{
  "ProjectID": {
    "value": "100349"
  },
  "ProjectTaskID": {
    "value": "L-726483"
  },
  "Description": {
    "value": "TEST"
  },
  "VisibilitySettings": {
    "GL": {
      "value": "true"
    },
    "AP": {
      "value": "true"
    },
    "CRM": {
      "value": "true"
    },
    "Expenses": {
      "value": "true"
    },
    "IN": {
      "value": "true"
    },
    "PO": {
      "value": "true"
    },
    "SO": {
      "value": "true"
    },
    "TimeEntries": {
      "value": "true"
    },
    "AR": {
      "value": "true"
    },
    "CA": {
      "value": "true"
    }
  }
}

 

 

Error : 

"Inserting  'Project Task' record raised at least one error. Please review the errors.\nProjectID: 'Project ID' cannot be empty.\nTaskCD: 'Task ID' cannot be empty.",

 

 

The project Exist in Acumatica 

 

 

 

Thanks

icon

Best answer by jinin 28 June 2023, 10:41

View original

4 replies

Userlevel 7
Badge +11

Hi @Driss ,

I have checked with the same JSON, and it is working fine for me.

First, please verify if you are able to create project tasks directly on the screen with the same data or not.

{
"ProjectID": {
"value": "PR00000019"
},
"ProjectTaskID": {
"value": "04"
},
"Description": {
"value": "TESTING"
},
"VisibilitySettings": {
"GL": {
"value": "true"
},
"AP": {
"value": "true"
},
"CRM": {
"value": "true"
},
"Expenses": {
"value": "true"
},
"IN": {
"value": "true"
},
"PO": {
"value": "true"
},
"SO": {
"value": "true"
},
"TimeEntries": {
"value": "true"
},
"AR": {
"value": "true"
},
"CA": {
"value": "true"
}
}
}

 

Userlevel 3
Badge

@jinin Yes when i try to create manually it working with no issues

Userlevel 7
Badge +11

Hi @Driss 

The issue lies with the project task value. Do not use a hyphen (-) in the value. When I tried using the same value with a hyphen, I encountered an issue. However, when I removed the hyphen and tried again, it worked fine.

Try like this,

 "ProjectTaskID": {
    "value": "L726483"
  },

Userlevel 3
Badge

@jinin I found the issue instead of 

"ProjectTaskID": {
    "value": "L-726483"
  },

i delete “-” from the value 

"ProjectTaskID": {
    "value": "L726483"
  },

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved