Problem with List Form!!!!!!!!

southindiansouthindian Member Posts: 247
Dear All...

I am facing a problem with list form. IN Sales order when ever user press f5 Sales list form gets loaded . My query is , the same sales list form get s loaded when user click f5 in Export order form the same sales list form get loaded.

the No series for sales order starts with SO-P0001..... etc

The No.series for export Order Starts with EO-E0001... etc

Whenever User click f5 in Sales order the no.series associated with Sales order should get sorted Ascending wise and the cursor should point the latest order which has been created (Frist record in sales list form.). And the same whenever User click f5 in Export order form the no.series associated with Export order should get sorted Ascending wise and the cursor should point the latest order which has been created (Frist record in sales list form.). The main point is both the Record related to sales order and the export order is getting reflected in the same sales header and sales line table. Need advice in this....
:-k

Comments

  • mabl4367mabl4367 Member Posts: 143
    What form is opened when you press f5 is determained by the property "LookupFormID" on table 36 "Sales Header". The default value of this property is "Sales List" (form 45).

    You could edit this forms OnOpenForm trigger to alter its behavior, sort order etc, depending on the value of LOOKUPMODE and the record "Rec" that is passed to it when f5 is pressed.
  • southindiansouthindian Member Posts: 247
    You mean that in the Open form trigger of Sales list form .... i can define the forms(like Sales order , Export order ) and make the system understand.... that from which form it has been called .... anm i right, is it posssible........ :-k
  • mabl4367mabl4367 Member Posts: 143
    Yes!

    You could check the contets of the field "Document Type" and "No." of the record Rec that is passed to the form when you press f5. That way you can determaine if the form was called from Sales Order or Export order.

    Depending on the outcome of this check you can change the forms caption and just about everything else to suit the differen kinds of documents.
  • southindiansouthindian Member Posts: 247
    Thanks ur idea is working fine... but still i had a small problem... the No series for sales order is defined as
    SO-60001 to SO100001... If i set the current key as Document type No. the system is considering 100001 as frist record(it takes as 1 instead as 100000 , which is less that 6 instead of 60000)... think u got... how resolve it
  • mabl4367mabl4367 Member Posts: 143
    Is the number series defined as SO-60001 to SO100001 and not SO-60001 to SO-100001?
  • southindiansouthindian Member Posts: 247
    let me explain u clearly.

    user has defined the no series like this

    for the year 2006 , they had created the no series starting with SO-60001.
    for the year 2007 , they had created the no series starting with SO-70001.
    for the year 2008 , they had created the no series starting with SO-80001.
    for the year 2009 , they had created the no series starting with SO-90001.
    when it comes to the year 2010 , they had created the no series starting with SO-100001.

    User want to cursro to point to the latest Sales order that has been created (Say SO-100035 then point the cursor to that record and it should comes as frist record of sales list or as the last record of the sales list).

    But System doesnot consider in sequence and it is considering the 100000 as 1 and sorting ascending with 100000 record frist and then comes the 60000 series and then 70000 series and finally 90000 series... u got my point
    Do we have any solution for that
  • mabl4367mabl4367 Member Posts: 143
    I don't think you can change the way navision sorts the records.

    It's probably not a good idea but would it be possible to rename all the old records on the form SO-0######? You could create a report that does this.

    This would probably lead to all sorts of problems but it's easy to test just to see what happens.
  • southindiansouthindian Member Posts: 247
    there is no other way to do the sorting
  • mabl4367mabl4367 Member Posts: 143
    You could sort on "Document date" perhaps then No.
  • southindiansouthindian Member Posts: 247
    u mean sort by (Document type,No.,Document Date)... i do think i need to define a n ew key in sales header table then........
  • mabl4367mabl4367 Member Posts: 143
    That's correct.
  • southindiansouthindian Member Posts: 247
    Same senario applies to Purchase list form also
  • mabl4367mabl4367 Member Posts: 143
    I think so.
  • southindiansouthindian Member Posts: 247
    THANK YOU SIR
Sign In or Register to comment.