New field/Help with Application studio

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… :smiley: :clown_face:

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. :slight_smile:

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.

I think I found the post this morning. I see I need to find out about BPMs and coding as well.

UD Columns
UD Column Maintenance - YouTube

BPM Basics
BPM Basics - YouTube

You’ve got to grips with these two videos. You’re good to go.

Just make sure your code complies ok and you do it in a TEST or PILOT instance before going to live.

image

1 Like

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.

Thanks!

Before you jump into creating UD Columns.

Take a look at the Integrations tab with

Delivery/Pickup options. These are automatically populated on the sales order. :confused:

Epicor Help - Manifest Info…

Here is the post.

I would get the ICE Tools guide, bpm cookbook and the admin guide.

Here is a KB on EpicCare about adding fields. I searched on add ud field process and it was the 5th or 6th result.
https://epiccare.epicor.com/epiccare?id=epiccare_kb_article&sys_id=787816cddb00f68c4b91fb5aaf96198e