Skip to main content
Solved

Equipment Timecard Web Service Endpoint

  • February 5, 2024
  • 2 replies
  • 160 views

robgriffin00
Jr Varsity II
Forum|alt.badge.img

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"}

        }

}

 

 

Best answer by robgriffin00

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

 

2 replies

robgriffin00
Jr Varsity II
Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • Answer
  • February 5, 2024

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

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • February 5, 2024

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