I have a variation on another post that was asked 11 moinths ago (here)
In my case, my user creates lines in the Sales Quote detail that have no inventory ID. They are used as instructions for the customer.
By default, when I am sendign this to a Service Order, it warns me that there are items with no inventory ID with a popup:
The opportunity contains one or multiple product lines with no inventory item specified. Click OK if you want to ignore these product lines and proceed with creating a service order. Click Cancel if you want to review the product lines and specify inventory items where necessary.
The problem is that I don’t to do either of these options. I want to Not have the warning, and just let it create a service order with Blank Inventory IDs.
Reading through stephenward03 thread, I have created this class, but the box comes up before I get to the creatDocument() function, so it isn’t heling me. I tried looking at the source code, but I don’t see a method that I can override to get me what I want:
Any ideas?
using PX.Data;
using PX.Objects.CS;
using PX.Objects.FS;
using PX.Objects.PM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PX.Objects.FS
{
public class DialogBoxSOApptCreation_Ext : PXGraphExtension<SM_ProjectEntry_DBox, SM_ProjectEntry, ProjectEntry>
{
public static bool IsActive() => PXAccess.FeatureInstalled<FeaturesSet.serviceManagementModule>();
public delegate void createDocument(ServiceOrderEntry srvOrdGraph, AppointmentEntry apptGraph,
DBoxHeader header, List<DBoxDetails> details);
PXOverride]
public void CreateDocument(ServiceOrderEntry srvOrdGraph, AppointmentEntry apptGraph,
DBoxHeader header, List<DBoxDetails> details, createDocument baseMethod)
{
baseMethod(srvOrdGraph, apptGraph, header, details);
FSServiceOrder myServiceOrder = (FSServiceOrder)srvOrdGraph.Caches<FSServiceOrder>().Current;
}
}
}