NAV 2009 R2 RTC CLOSES WITH MULTIPLE SUBFORMS

Hi All,

I have a sales order page 42 i customized it such a way the sales lines also show their item cost lines in another subform.

this is how the hierarchy is .

sales header data

→ Sales lines subform with item information

→ Sales cost lines related to sales lines subform (assigned line number customized field to link to the sales lines)

when the delete the sales item line which has the cost lines associated with it… i need to show error to delete the cost lines first…

i wrote the code on ondelete trigger of sales line table saying if you have cost lines linked with it then error.

The problem is when i delete the sales line in the order page NAV RTC CLOSES. this might look strange… but rtc subform can not accept error message on deletion of its data if it has another child with it… IF both childs belong to same table THEN RTC CLOSES

i AM EXPECTING SOME SUGGESTIONS FROM EXPERTS… PLEASE…!

Thanks,

Anil.

Hi Anil,

Don’t know if this can apply to your needs, but how abt instead of ERROR, use CONFIRM to have the user confirm that the cost-lines will be deleted as well.

Then delete them through code from the delete-trigger using DELETE(FALSE), and then “manually” clean up what is cleaned in the delete-trigger.

Hi alexander…

i already know the answer of confirm of deleting the cost lines i applied it as well… but my point it why rtc client close when i place error at this point…?

i checked with confirm and message both are working fine… only error is behaving so strange…!

i am looking for an answer why error is closign rtc client which is wierd…!

but anyway thank you so much for your thought on this…

Anil.