Skip to main content

How can I automatically add details lines to a new service order

  • 4 February 2022
  • 2 replies
  • 368 views

Hi All

I’ve created a customization that adds a new action on the service contract screen that will launch the service order screen, create a new service order, and auto-fill a number of fields with data using parameters from the service contract screen (customer, location, date, branch loc., service order type).  I would also like to automatically add a number detail lines to the service order, but haven’t been able to find a good way to do this.

I’ve tried a business event with an import scenario, but data entry forms don’t seem to allow import scenarios.

I thought of creating a template for the detail lines, but not sure if I can execute the “Paste From <template name>” action programmatically.

We have a fair number of unique service order types that have their own set of item details that need to be included, and we would prefer to automate these steps to reduce the chance of data entry errors.

Any ideas would be much appreciated.

Thanks.

Dan

2 replies

Userlevel 7
Badge +6

@DanNixon , I’m not sure what exactly you’re trying to do, and how you are going to use it, but import scenario do work with data entry screens. Actually, they are created specifically for data entry screens. For instance, for service orders screen, you need to have the following elements (at minimum), that will allow you to create a service order with detail lines:

  1. Service Order Type
  2. Service Order Nbr (any identifier, that should be the same for each detail line)
  3. Customer
  4. Inventory ID

So, if you need a service order INST, for customer ACME, with details being WIDGET1 and WIDGET2, your data provider would need to be:

INST | 000001 | ACME | WIDGET1

INST | 000001 | ACME | WIDGET2

If I understand you correctly though, you’re trying to invoke the Service Orders screen, and pass data their programmatically. If so, it will have nothing to do with import scenarios, business events, and other UI level capabilities.

In order for the forum to better assist you, please describe how you see your solution working. If the idea is to really use customization with a custom code, this topic will be better answered in the Customizations section of the Forum.

Hi Yuri

Thanks for your response.  You are correct, I posted in the wrong section.

This is a customization, where the user is selecting a customer action on the Service Contract screen and it is opening the Service Order screen in a new window and auto-filling a number of fields.

I also want to automatically create a number of entries in the “Details” grid, but haven’t been able to find any way to do this without some coding.

I’ve tested some code to do this, but running into an issue there.  

I’ll move this over to the Customizations section.

Dan

 

Reply