Changing the BO's editing state to new with values already filled.


Author
Message
Vikram Saxena
Vikram Saxena
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 41, Visits: 99
I have added a custom button on the SF Maintenance form to copy the current row values of the business object. on the clicked event of the button(copy) what i am doing is

1-> Store the Current Row,

2-> Begin a new row for BO.

3-> fill the values by fetching from data row we have in 1-> .

4-> invoke edit on the BO.



here is the code.



DataRow currentRow = employeeBO1.CurrentRow;

employeeBO1.NewRow();

for (int i = 0; i < currentRow.ItemArray.Length; i++)

{

employeeBO1.CurrentRow[i] = currentRow[i];

}

employeeBO1.Edit();



Till this everything is working very fine but the problem occurs when i click save and there is any broken rules exists on the form. i got the message that There are 'X' broken rules present.

when i click on the form to correct the values ...Zing...the new record gone..i reached to the last record that i copied. This works fine if there are no broken rules present for the new record....Please help...its very urgent..
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search