Solved

Equipment Timecard Web Service Endpoint

  • 5 February 2024
  • 2 replies
  • 47 views

Userlevel 3
Badge

I have created a web service for Equipment Timecard.

In the web service, I have the entry screen (EP308000) as DocumentSummary, the Summary Tab (EP308000) as a collection named DocumentLine, the Details Tab (EP308000) as a collection named LineDetail and the main screen Equipment Timecards (EP407000).  

 

Web Service Setup for Equipment TImecard

When I run this in Postman, it only creates a record in EP308000 and there is no detail and EP407000 there are no totals. 

 

Result of running web service in Postman - Missing the totals
Result of running web service in Postman - Missing the Summary Tab and Details Tab data

 

This is the body of the content that I am sending in Postman.  It is not throwing any errors. Based on how the screen works, I believe I am mimicking the flow. Is the flow I am attempting wrong?

 

{

    "RefNbr": {"value":"EQ00000045"},

    "EquipmentID": {"value":"1"},

    "Status": {"value":"On-Hold"},

    "Week": {"value":"2024-06"},

    "Type": {"value":"Normal"},

    "DocumentSummary":

    [

        {

            "TimeCardCD": {"value": "EQ00000045"},

            "LineNbr": {"value": "1"},

            "Project": {"value": "PR00000045"},

            "Task": {"value": "01"},

            "CostCode": {"value": "01300"},

            "RateType": {"value": "RUN"},

            "Mon": {"value": "08:00"},

            "TimeSpent": {"value": "08:00"},

            "Billable": {"value": "true"},

            "Description": {"value": "Robs Test"}

        }

    ],

    "DetailLine":

    [

        {

            "TimeCardCD": {"value": "EQ00000045"},

            "LineNbr": {"value": "1"},

            "Project": {"value": "PR00000045"},

            "Task": {"value": "01"},

            "CostCode": {"value": "01300"},

            "RunTime": {"value": "08:00"},

            "Billable": {"value": "true"},

            "Description": {"value": "Robs Test"},

            "Total": {"value": "08:00"}

        }

    ],

    "Main":

          {

            "RefNbr": {"value":"EQ00000045"},

            "EquipmentID": {"value":"1"},

            "Status": {"value":"On-Hold"},  

            "RunTime": {"value":"08:00"},

            "BillableRunTime": {"value":"08:00"},  

            "Total": {"value":"08:00"},

            "BillableTotal": {"value":"08:00"}

        }

}

 

 

icon

Best answer by robgriffin00 5 February 2024, 10:12

View original

2 replies

Userlevel 3
Badge

I found my error.  I needed to have the Document Total Fields as a LinkedEntity instead of trying to pull in EP407000.  Once I fixed that I saw that ProjectTask was misspelled as Task.  

Correct Web Service Representation

 

Corrected Postman Call

 

{

 "RefNbr": {"value":"EQ00000047"},

    "EquipmentID": {"value":"1"},

    "Status": {"value":"On-Hold"},

    "Week": {"value":"2024-02-26T00:00:00-06:00"},

    "Type": {"value":"Normal"},

    "Run": {"value":"08:00"},

    "BillableRun": {"value":"08:00"},

    "Total": {"value":"08:00"},  

    "BillableTotal": {"value":"08:00"},

     

    "SummaryLine":

    [

        {

            "TimeCardCD": {"value": "EQ00000047"},

            "LineNbr": {"value": "1"},

            "Project": {"value": "PR00000045"},

            "ProjectTask": {"value": "01"},

            "CostCode": {"value": "01300"},

            "RateType": {"value": "RUN"},

            "Mon": {"value": "08:00"},

            "TimeSpent": {"value": "08:00"},

            "Billable": {"value": "true"},

            "Description": {"value": "Robs Test"}

        }

    ],

    "DetailLine":

    [

        {

            "TimeCardCD": {"value": "EQ00000047"},

            "LineNbr": {"value": "1"},

            "Project": {"value": "PR00000045"},

            "ProjectTask": {"value": "01"},

            "CostCode": {"value": "01300"},

            "RunTime": {"value": "08:00"},

            "Billable": {"value": "true"},

            "Description": {"value": "Robs Test"},

            "Total": {"value": "08:00"}

        }

    ]

 

   

}

 

Result of Postman call

 

Userlevel 7
Badge

Thank you for sharing your solution with the community @robgriffin00!

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