I have searched for help on this but I haven’t had any luck finding anything I understand on this task (I’m new to Kinetic and Application Studio).
I am looking to add a field to Customer Entry where we can enter comments/notes that will appear on the sales orders. I added a Text Area to the Customer Entry form thinking that’s the correct first step. Is it? How do I create a field on the Sales Order Entry that will be populated with this info from the Customer Entry screen when that customer is selected during Sales Order Entry? Thanks in advance for any help with this.
Where do you want it to appear on the Sales Order?
Steps
Create UD Column for OrderHed, OrderDtl wherever you want to store this information pulled from Customer table. (I would personally say OrderHed…UD_CustSalesComms_c)
Create your UD column for Customer table (eg…UD_SalesComments_c)
Add those fields to both screens in the location of your choice.
Create a BPM on Method → Post Processing on SalesOrder.ChangeCustomer
Drag a custom code block on the screen.
Fire in some code…
BOOM…
//OrderHed to Customer
try
{
Erp.Tables.Customer Customer;
var OrdHed = (from r in ttOrderHed
where r.Added() || r.Updated()
select r).FirstOrDefault();
if (OrdHed != null)
{
var Cust = (from c in Db.Customer
where c.Company == Session.CompanyID && c.CustNum == OrdHed.CustNum
select c).FirstOrDefault();
if (Cust != null)
{
OrderHed.UD_CustSalesComms_C = Cust.UD_SalesComments_c;
}
else
{
// Handle the case where Cust is null
}
}
else
{
// Handle the case where OrdHed is null
}
}
catch (Exception ex)
{
// Handle any exceptions here
// Console.WriteLine($"An error occurred: {ex.Message}"); -- EXAMPLE
}
Hope this helps. @klincecum will probably have better code…
Do you have the Kinetic Application Studio user Guide for your version from EpicWeb? This should be covered in there.
As @aarong detailed you will need to add a field to the customer table and then you can use any of the sales order comment fields. There a question just this morning on how to get a customer field into the order details using widgets.
Indeed as @gpayne suggested. It is always better to use existing base fields like comments. You can always do field help to make sure you’re getting the correct field name.
I’m looking at the user guide in EpicWeb. I’m going to try working through it. What was the post from this morning called? I’ll look for that. The thing is a lot of @aarong said is over my head at this point. I get the gist of what he’s saying but I do not know the steps to take to get it done. I’ll keep reading and watching the videos and searching here. Thanks.
Regarding using existing comments field, the comments we want to add and include on the sales order and shipping info are things like “deliver to side door”. We don’t want all of our customer comments included That’s why I think I need to add a field just for those types of comments.