CS1513 Compilation error

I think I found a solution using a simplified version of the code and it compile no-errors. I tested the BPM and it works!


Erp.Tables.COMXref COMXref;
foreach (var ttporel_xRow in ttporel)
{
    var ttporelRow = ttporel_xRow;
    COMXref = new Erp.Tables.COMXref();
    Db.COMXref.Insert(COMXref);
    COMXref.Company = "CQE";
    COMXref.File = "PORel_Mapping";
    COMXref.Key1 = System.Convert.ToString(ttporelRow.PONum);
    COMXref.Key2 = System.Convert.ToString(ttporelRow.POLine);
    COMXref.Key3 = System.Convert.ToString(ttporelRow.PORelNum);
    COMXref.foreignKey1 = "No";
    COMXref.foreignKey2 = "Yes";
}


Thank you all for your replies.

Daniel Dell'Aquila

Hi All,

For some reason I keep getting an error CS1513 "The compiler expected a closing curly brace (}) that was not found" when trying to compile the code below:


using System;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Transactions;
using Epicor.Data;
using Erp;
using Erp.Tables;
using Ice;
namespace Erp.Services.Erp.PO.Update
   {
   public partial class Erp.PO {
#region Implicit buffers
      Erp.Tables.COMXref COMXref;
#endregion
      public Erp.PO(ContextBoundBase  ctx)
      : base(ctx)
         {
         foreach(var ttporel in ttporelRows)
            {
            porel ttporelRow = ttporel;
            COMXref = new Erp.Tables.COMXref();
            Db.COMXref.Insert(COMXref);  
            COMXref.Company = "CQE";
            COMXref.File = "PORel_Mapping";
            COMXref.Key1 = Compatibility.Convert.ToString(ttporelRow.PONum);
            COMXref.Key2 = Compatibility.Convert.ToString(ttporelRow.POLine);
            COMXref.Key3 = Compatibility.Convert.ToString(ttporelRow.PORelNum);
            COMXref.foreignKey1 = "No";
            COMXref.foreignKey2 = "Yes";
            }
         }
      }
   }


This code is part of a BPM, but it seems I can't find the problem.

Any ideas?


Thanks in advance
Daniel Dell'Aquila

Can you paste your code as it is written in the BPM (Editor) not the cs file, it would make things easier to identify

I don't see anything off hand though

Thanks!


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Mon, Sep 22, 2014 at 2:13 AM, ddellaquila@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p><span></span></p><p>Hi All,</p><p>For some reason I keep getting an error CS1513 &quot;The compiler expected a closing curly brace (<span>}</span>) that was not found&quot; when trying to compile the code below:</p><p><br></p><p>using System;<br>using System.Data;<br>using System.Linq;<br>using System.Linq.Expressions;<br>using System.Transactions;<br>using Epicor.Data;<br>using Erp;<br>using Erp.Tables;<br>using Ice;<br>namespace Erp.Services.Erp.PO.Update<br>   {<br>   public partial class Erp.PO {<br>#region Implicit buffers<br>      Erp.Tables.COMXref COMXref;<br>#endregion<br>      public Erp.PO(ContextBoundBase  ctx)<br>      : base(ctx)<br>         {<br>         foreach(var ttporel in ttporelRows)<br>            {<br>            porel ttporelRow = ttporel;<br>            COMXref = new Erp.Tables.COMXref();<br>            Db.COMXref.Insert(COMXref);   <br>            COMXref.Company = &quot;CQE&quot;;<br>            COMXref.File = &quot;PORel_Mapping&quot;;<br>            COMXref.Key1 = Compatibility.Convert.ToString(ttporelRow.PONum);<br>            COMXref.Key2 = Compatibility.Convert.ToString(ttporelRow.POLine);<br>            COMXref.Key3 = Compatibility.Convert.ToString(ttporelRow.PORelNum);<br>            COMXref.foreignKey1 = &quot;No&quot;;<br>            COMXref.foreignKey2 = &quot;Yes&quot;;<br>            }<br>         }<br>      }<br>   }</p><p><br></p><p>This code is part of a BPM, but it seems I can&#39;t find the problem.</p><p>Any ideas?</p><p><br></p><p>Thanks in advance<br>Daniel Dell&#39;Aquila<br></p><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

Hi Jose,


Thank you for replying to my post. Actually, that's the main code of the BPM. Just a condition and a set field prior to the c# execution. As you can see, its is using the Erp.PO.Update method.


Here are the screen shots:




Yeah but your BPM Editor dosesn't have your class definitino and such inside... It should just be starting at the for each or something like that.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Mon, Sep 22, 2014 at 11:45 AM, ddellaquila@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p>Hi Jose,</p><p><br></p><p>Thank you for replying to my post. Actually, that&#39;s the main code of the BPM. Just a condition and a set field prior to the c# execution. As you can see, its is using the Erp.PO.Update method.</p><p><br></p><p>Here are the screen shots:</p><p><br></p><p><img></p><p><br></p><p><br></p><p><img></p><p><br></p><p><img></p><p><br></p><p><br></p><p><img><br></p><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

Your attachments will never come to the group.  Please put a link for them or save them to the user group itself.

 

Manasa

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Monday, September 22, 2014 10:46 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: CS1513 Compilation error

 

 

Hi Jose,

 

Thank you for replying to my post. Actually, that's the main code of the BPM. Just a condition and a set field prior to the c# execution. As you can see, its is using the Erp.PO.Update method.

 

Here are the screen shots:

 

 

 

 

 

 

Would you mind sharing how you visualize the code as it should be? I tried tweaking the code in different ways with no results yet.


Thanks,

Daniel.

Got it. Thanks, Manasa.


Daniel.

Are you writing custom code for this BPM?

On Sep 22, 2014 12:27 PM, "ddellaquila@... [vantage]" <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p><p>Would you mind sharing how you visualize the code as it should be? I tried tweaking the code in different ways with no results yet.</p><p><br></p><p>Thanks,</p><p>Daniel.<br></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

So sad that that code is even still necessary

 

Those  values should have been moved to the PORel table eons ago

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Monday, September 22, 2014 2:13 AM
To: vantage@yahoogroups.com
Subject: [Vantage] CS1513 Compilation error

 




Hi All,

For some reason I keep getting an error CS1513 "The compiler expected a closing curly brace (}) that was not found" when trying to compile the code below:

 

using System;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Transactions;
using Epicor.Data;
using Erp;
using Erp.Tables;
using Ice;
namespace Erp.Services.Erp.PO.Update
   {
   public partial class Erp.PO {
#region Implicit buffers
      Erp.Tables.COMXref COMXref;
#endregion
      public Erp.PO(ContextBoundBase  ctx)
      : base(ctx)
         {
         foreach(var ttporel in ttporelRows)
            {
            porel ttporelRow = ttporel;
            COMXref = new Erp.Tables.COMXref();
            Db.COMXref.Insert(COMXref);  
            COMXref.Company = "CQE";
            COMXref.File = "PORel_Mapping";
            COMXref.Key1 = Compatibility.Convert.ToString(ttporelRow.PONum);
            COMXref.Key2 = Compatibility.Convert.ToString(ttporelRow.POLine);
            COMXref.Key3 = Compatibility.Convert.ToString(ttporelRow.PORelNum);
            COMXref.foreignKey1 = "No";
            COMXref.foreignKey2 = "Yes";
            }
         }
      }
   }

 

This code is part of a BPM, but it seems I can't find the problem.

Any ideas?

 

Thanks in advance
Daniel Dell'Aquila




I migrated it from ABL to C# to implement it in 10. The old ABL (below) was working in Vantage.


for each ttporel.

   create COMXref.
   assign COMXref.Company      = "CQE"
          COMXref.file         = "PORel_Mapping"
          COMXref.Key1         = string(ttporel.PONum)
       COMXref.Key2         = string(ttporel.POLine)
       COMXref.Key3         = string(ttporel.PORelNum)
      COMXref.foreignKey1  = "No"
      COMXref.foreignKey2  = "Yes".


end.