FOB Origin as default

Did you check Customer Maintenance under Billing > Shipping Terms?  There is a field for FOB.  If populated it will carry over when you create the sales order.
Is there a way to have a default FOB set on a Sales Order without a BPM?

Customer maintenance, Billing Tab.  Default for Customer when used in SO Entry

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of senske3@...
Sent: Thursday, December 05, 2013 4:51 PM
To: vantage@yahoogroups.com
Subject: [Vantage] FOB Origin as default

 

 

Is there a way to have a default FOB set on a Sales Order without a BPM?

Private Sub Customer_BeforeFieldChange(ByVal sender As object, ByVal args As DataColumnChangeEventArgs)

        '// ** Argument Properties and Uses **

        '// args.Row("[FieldName]")

        '// args.Column, args.ProposedValue, args.Row

        '

        'Add Event Handler Code

        '

        Select Case args.Column.ColumnName

    

                                Case "CustID"

                                                If (args.Row("CustID")="") Then   'Is a New Customer

                                                                edvCustomer.dataView(edvCustomer.Row)("DefaultFOB") = "<FOB IDE>"  

                                                                edvCustomer.dataView(edvCustomer.Row)("FOBDescription") = "<FOB DESCRIPTION>"

                                                End If

                                Case Else

                               

                                End Select

    

    End Sub

 Scott,
I tried this code that you posted.  I could not make it work.  Here is my revised code:
private void Customer_BeforeFieldChange(object sender, DataColumnChangeEventArgs args)
    {
        // ** Argument Properties and Uses **
        // args.Row["FieldName"]
        // args.Column, args.ProposedValue, args.Row
        // Add Event Handler Code
        switch (args.Column.ColumnName)
        {
            case "CustID":
        if (args.Row("CustID")="") then new (Customer);
        edvCustomer.dataView(edvCustomer.Row)("DefaultFOB") = "<FOB IDE>"; 
        edvCustomer.dataView(edvCustomer.Row)("FOBDescription") = "<FOB DESCRIPTION>";
        }
    }
I am getting one error...Error CS1002-line 64 (463) - ; expected.
Line 64 is " if (args.Row("CustID")="") then new (Customer);"
What is wrong with this line?

if ((string.IsNullOrEmpty(args.Row("CustID")))) {

//Is a New Customer

edvCustomer.dataView(edvCustomer.Row)("DefaultFOB") = "<FOB IDE>"; 
        edvCustomer.dataView(edvCustomer.Row)("FOBDescription") = "<FOB DESCRIPTION>";
        }

I think the new customer is only a comment…

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tom.sederquist@...
Sent: Tuesday, April 01, 2014 1:02 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: FOB Origin as default

 

 

Private Sub Customer_BeforeFieldChange(ByVal sender As object, ByVal args As DataColumnChangeEventArgs)

        '// ** Argument Properties and Uses **

        '// args.Row("[FieldName]")

        '// args.Column, args.ProposedValue, args.Row

        '

        'Add Event Handler Code

        '

        Select Case args.Column.ColumnName

    

                                Case "CustID"

                                                If (args.Row("CustID")="") Then   'Is a New Customer

                                                                edvCustomer.dataView(edvCustomer.Row)("DefaultFOB") = "<FOB IDE>"  

                                                                edvCustomer.dataView(edvCustomer.Row)("FOBDescription") = "<FOB DESCRIPTION>"

                                                End If

                                Case Else

                               

                                End Select

    

    End Sub

 Scott,
I tried this code that you posted.  I could not make it work.  Here is my revised code:
private void Customer_BeforeFieldChange(object sender, DataColumnChangeEventArgs args)
    {
        // ** Argument Properties and Uses **
        // args.Row["FieldName"]
        // args.Column, args.ProposedValue, args.Row
        // Add Event Handler Code
        switch (args.Column.ColumnName)
        {
            case "CustID":
        if (args.Row("CustID")="") then new (Customer);
      &nb sp; edvCustomer.dataView(edvCustomer.Row)("DefaultFOB") = "<FOB IDE>"; 
        edvCustomer.dataView(edvCustomer.Row)("FOBDescription") = "<FOB DESCRIPTION>";
        }
    }
I am getting one error...Error CS1002-line 64 (463) - ; expected.
Line 64 is " if (args.Row("CustID")="") then new (Customer);"
What is wrong with this line?

private void Customer_BeforeRowChange(EpiRowChangingArgs args)
{
    // ** Argument Properties and Uses **
    // args.CurrentView.dataView[args.CurrentRow]["FieldName"]
    // args.ProposedRow, args.CurrentRow, args.CurrentView
    // Add Event Handler Code
    switch (args.Column.ColumnName) ;

        if ((string.IsNullOrEmpty(args.Row("CustID")))) {
            edvCustomer.dataView(edvCustomer.Row)("DefaultFOB") = "<FOB IDE>";
            edvCustomer.dataView(edvCustomer.Row)("FOBDescription") = "<FOB DESCRIPTION>";
            }}
}

I'm still getting an error message on this. ( Error: CS1514 - line 60 (472) - { expected)  I'm pretty new (and self taught) to coding like this.  Does anyone know what the problem is?  If I put "{" in at line 60 it just spits out a similar error on another line.  If I fix that line, then it spits out an error for line 60 again.
Why not use a BPM – Post Process on Customer.GetNew ?

Charlie Smith
ESSNER Manufacturing, L.P.
6651 Will Rogers Blvd.
Fort Worth, TX 76140
csmith@...<mailto:csmith@...>
ph: (817) 529-6165
fx: (817) 568-2625

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tom.sederquist@...
Sent: Tuesday, April 8, 2014 4:02 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: FOB Origin as default



private void Customer_BeforeRowChange(EpiRowChangingArgs args)
{
// ** Argument Properties and Uses **
// args.CurrentView.dataView[args.CurrentRow]["FieldName"]
// args.ProposedRow, args.CurrentRow, args.CurrentView
// Add Event Handler Code
switch (args.Column.ColumnName) ;

if ((string.IsNullOrEmpty(args.Row("CustID")))) {
edvCustomer.dataView(edvCustomer.Row)("DefaultFOB") = "<FOB IDE>";
edvCustomer.dataView(edvCustomer.Row)("FOBDescription") = "<FOB DESCRIPTION>";
}}
}

I'm still getting an error message on this. ( Error: CS1514 - line 60 (472) - { expected) I'm pretty new (and self taught) to coding like this. Does anyone know what the problem is? If I put "{" in at line 60 it just spits out a similar error on another line. If I fix that line, then it spits out an error for line 60 again.



[Non-text portions of this message have been removed]
<!-- #ygrps-yiv-2059793837 _filtered #ygrps-yiv-2059793837 {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0;} _filtered #ygrps-yiv-2059793837 {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0;} _filtered #ygrps-yiv-2059793837 {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #ygrps-yiv-2059793837 {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #ygrps-yiv-2059793837 {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #ygrps-yiv-2059793837 {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4;} #ygrps-yiv-2059793837 #ygrps-yiv-2059793837 p.ygrps-yiv-2059793837MsoNormal, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837MsoNormal, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman", "serif";} #ygrps-yiv-2059793837 a:link, #ygrps-yiv-2059793837 span.ygrps-yiv-2059793837MsoHyperlink { color:blue; text-decoration:underline;} #ygrps-yiv-2059793837 a:visited, #ygrps-yiv-2059793837 span.ygrps-yiv-2059793837MsoHyperlinkFollowed { color:purple; text-decoration:underline;} #ygrps-yiv-2059793837 p {

margin-right:0in;

margin-left:0in;
font-size:12.0pt;
font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-2059793837 code
{
font-family:“Courier New”;}
#ygrps-yiv-2059793837 pre
{

margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:“Courier New”;}
#ygrps-yiv-2059793837 tt
{
font-family:“Courier New”;}
#ygrps-yiv-2059793837 span.ygrps-yiv-2059793837HTMLPreformattedChar
{

font-family:Consolas;}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837attach, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837attach, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837attach
{

margin-right:0in;

margin-left:0in;
font-size:9.0pt;
font-family:“Arial”, “sans-serif”;}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837bold, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837bold, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837bold
{

margin-right:0in;

margin-left:0in;
font-size:10.0pt;
font-family:“Arial”, “sans-serif”;
font-weight:bold;}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837green, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837green, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837green
{

margin-right:0in;

margin-left:0in;
font-size:12.0pt;
font-family:“Times New Roman”, “serif”;
color:#628C2A;}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837replbq, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837replbq, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837replbq
{
margin:3.0pt;
font-size:12.0pt;
font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837ad, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837ad, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837ad
{

margin-right:0in;

margin-left:0in;
font-size:12.0pt;
font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837underline, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837underline, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837underline
{

margin-right:0in;

margin-left:0in;
font-size:12.0pt;
font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-2059793837 span.ygrps-yiv-2059793837yshortcuts
{}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837ad1, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837ad1, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837ad1
{

margin-right:0in;

margin-left:0in;
font-size:12.0pt;
font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837ad2, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837ad2, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837ad2
{

margin-right:0in;
margin-bottom:7.5pt;
margin-left:0in;
font-size:12.0pt;
font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-2059793837 p.ygrps-yiv-2059793837underline1, #ygrps-yiv-2059793837 li.ygrps-yiv-2059793837underline1, #ygrps-yiv-2059793837 div.ygrps-yiv-2059793837underline1
{

margin-right:0in;

margin-left:0in;
font-size:12.0pt;
font-family:“Times New Roman”, “serif”;
text-decoration:underline;}
#ygrps-yiv-2059793837 span.ygrps-yiv-2059793837yshortcuts1
{
font-family:“Verdana”, “sans-serif”;
font-weight:bold;}
#ygrps-yiv-2059793837 span.ygrps-yiv-2059793837yshortcuts2
{
font-family:“Verdana”, “sans-serif”;
font-weight:normal;}
#ygrps-yiv-2059793837 span.ygrps-yiv-2059793837EmailStyle34
{
font-family:“Calibri”, “sans-serif”;
color:#1F497D;}
#ygrps-yiv-2059793837 .ygrps-yiv-2059793837MsoChpDefault
{
font-size:10.0pt;}
_filtered #ygrps-yiv-2059793837 {
margin:1.0in 1.0in 1.0in 1.0in;}
#ygrps-yiv-2059793837 div.ygrps-yiv-2059793837WordSection1
{}
#ygrps-yiv-2059793837
_filtered #ygrps-yiv-2059793837 {
}
_filtered #ygrps-yiv-2059793837 {

font-family:Symbol;}
_filtered #ygrps-yiv-2059793837 {

font-family:“Courier New”;
}
_filtered #ygrps-yiv-2059793837 {

font-family:Wingdings;}
_filtered #ygrps-yiv-2059793837 {

font-family:Wingdings;}
_filtered #ygrps-yiv-2059793837 {

font-family:Wingdings;}
_filtered #ygrps-yiv-2059793837 {

font-family:Wingdings;}
_filtered #ygrps-yiv-2059793837 {

font-family:Wingdings;}
_filtered #ygrps-yiv-2059793837 {

font-family:Wingdings;}
_filtered #ygrps-yiv-2059793837 {

font-family:Wingdings;}
#ygrps-yiv-2059793837 ol
{margin-bottom:0in;}
#ygrps-yiv-2059793837 ul
{margin-bottom:0in;}
–>

Try this

 

private void Customer_BeforeRowChange(EpiRowChangingArgs args)
{
// ** Argument Properties and Uses **
// args.CurrentView.dataView[args.CurrentRow][“FieldName”]
// args.ProposedRow, args.CurrentRow, args.CurrentView
// Add Event Handler Code


switch (args.Column.ColumnName)

{

case “CustID :

                      if ((string.IsNullOrEmpty(args.Row(“CustID”))))

{

edvCustomer.dataView(edvCustomer.Row)(“DefaultFOB”) = “<FOB IDE>”;
edvCustomer.dataView(edvCustomer.Row)(“FOBDescription”) = “<FOB DESCRIPTION>”;

}

                      break;

}

}

 

 

Scott

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Charlie Smith
Sent: Tuesday, April 08, 2014 4:04 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: FOB Origin as default

 

 

Why not use a BPM – Post Process on Customer.GetNew ?

Charlie Smith
ESSNER Manufacturing, L.P.
6651 Will Rogers Blvd.
Fort Worth, TX 76140
csmith@…<mailto:csmith@…>
ph: (817) 529-6165
fx: (817) 568-2625

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tom.sederquist@…
Sent: Tuesday, April 8, 2014 4:02 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: FOB Origin as default



private void Customer_BeforeRowChange(EpiRowChangingArgs args)
{
// ** Argument Properties and Uses **
// args.CurrentView.dataView[args.CurrentRow][“FieldName”]
// args.ProposedRow, args.CurrentRow, args.CurrentView
// Add Event Handler Code
switch (args.Column.ColumnName) ;

if ((string.IsNullOrEmpty(args.Row(“CustID”)))) {
edvCustomer.dataView(edvCustomer.Row)(“DefaultFOB”) = “<FOB IDE>”;
edvCustomer.dataView(edvCustomer.Row)(“FOBDescription”) = “<FOB DESCRIPTION>”;
}}
}

I’m still getting an error message on this. ( Error: CS1514 - line 60 (472) - { expected) I’m pretty new (and self taught) to coding like this. Does anyone know what the problem is? If I put “{” in at line 60 it just spits out a similar error on another line. If I fix that line, then it spits out an error for line 60 again.


[Non-text portions of this message have been removed]