Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Insert OE detail line in the middle of the OE lines

Insert OE detail line in the middle of the OE lines

Insert OE detail line in the middle of the OE lines


Version Sage v2017, Working on a custom app to insert to OE detail. The requirement is to insert a new OE line after a certain OE line. I can't get it to work. Could you please provide some pointer ?

//2017-09-21 for printing order fix
//Set where to start in order detail....
OEORD1detail1.Fields.FieldByName["LINENUM"].PutWithoutVerification(sOrderDetailLineStartFrom); // ' Line Number
temp = OEORD1detail1.Exists;
//Then.... the back order lines
for (int i = lst_BackOrderLine.Count - 1; i >= 0; i--)

string sItem = lst_BackOrderLine[i].Component; //lstOEDetail[i].ItemNo;

decimal decQtyOrdered = decimal.Parse(lst_BackOrderLine[i].ComponentQtyInBOM);//
decimal decUnitPrice = decimal.Parse("0");
string sUnit = lst_BackOrderLine[i].Unit; // "1"; // lstOEDetail[i].PriceUnit;
string sLocation = lst_BackOrderLine[i].Location; // "1"; // lstOEDetail[i].Location;
//string sPriceList = lstOEDetail[i].PriceList;

//bool temp = OEORD1detail1.Exists;

temp = OEORD1detail1.Exists;
OEORD1detail1.RecordCreate(tagViewRecordCreateEnum.VIEW_RECORD_CREATE_NOINSERT); // 0

OEORD1detail1.Fields.FieldByName["ITEM"].set_Value(sItem); // ' Item
OEORD1detail1.Fields.FieldByName["PROCESSCMD"].PutWithoutVerification("1"); //' Process Command

//OEORD1detail1.Fields.FieldByName["PRICELIST"].set_Value(sPriceList); //Price list
OEORD1detail1.Fields.FieldByName["QTYORDERED"].set_Value(decQtyOrdered); //' Quantity Ordered

OEORD1detail1.Fields.FieldByName["PRIUNTPRC"].set_Value(decUnitPrice); //' Pricing Unit Price
OEORD1detail1.Fields.FieldByName["LOCATION"].set_Value(sLocation); //' Pricing Unit Price
OEORD1detail1.Fields.FieldByName["PRICEUNIT"].set_Value(sUnit); //' Pricing Unit of Measure


OEORD1detail1.Fields.FieldByName["LINENUM"].PutWithoutVerification("-1"); //' Line Number

temp = OEORD1detail1.Exists;
OEORD1detail1.RecordCreate(tagViewRecordCreateEnum.VIEW_RECORD_CREATE_NOINSERT); // 0

OEORD1header.Fields.FieldByName["OECOMMAND"].set_Value("0"); //' Process O/E Command
temp = OEORD1header.Exists;

RE: Insert OE detail line in the middle of the OE lines

OEORDD.LINENUM needs to be set to the LINENUM of the record that you want to insert in front of, just before you .RecordCreate.

Sage 300 Whisperer

RE: Insert OE detail line in the middle of the OE lines

Thanks. It works with your recommendation.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close