add new customer after make filter settableview proplem

ahmedbaahmedba Member Posts: 424
Hi guys i have problem in customer card i make source table view properties to make filtration to one branch jeco.

meaning employee of branch jeco they will see customer of jeco branch only .but when i add new customer as serial i have before by 1 it back again to last one why this make.are there are any way to incremental by 1 after make filtration.

my customers as following :

1500

1501

1502

then make filtration from filter group or set table view on branch to see only jeco entries only.(my branches found in database related to branch(jeco -meco-saleco)

but now when i add new customer it must come 1503.but it not come 1503 it come 1502 how i will solve this problem.

my default incremental from before as 1.

please help me

thanks

Comments

  • annivasuannivasu Member Posts: 10
    Hi ahmedba,

    The Customer Nos. are incrementing but you are not able to see due to SetTableview filters,

    In that case you have assign your branch name with your branc field on Form's OnNewRecord trigger by using
    "Branch Field" := BranchValue


    Hope this will work.

    /Nitin
  • ahmedbaahmedba Member Posts: 424
    I assign this value as you say but no any thing happen .because record found in table but no globale dimension code 1(branch code)
    and filter has specified location can any one help me in code if possible

    this code i put in customer card in open form trigger

    IF UserSetup.GET(USERID) THEN BEGIN
    MESSAGE(UserSetup."User ID");
    IF (UserSetup."Global Dimension 1 Code" <> '') THEN BEGIN
    FILTERGROUP := 2;
    SETRANGE("Global Dimension 1 Code",UserSetup."Global Dimension 1 Code");
    FILTERGROUP := 0;
    END;

    END;
    my question here how i assign inserted record with filter assigned
    suppose my location is jed inserted record how i assign value jed to it
    thanks
  • annivasuannivasu Member Posts: 10
    Hi ahmedba,

    You code is ok with OpenFrom Trigger.
    Just go to my reply and write your code on OnNewRecord trigger as explained in Reply.

    /Nitin
  • ahmedbaahmedba Member Posts: 424
    Thanks for reply but i test this before but it not work
    same code in open trigger of form
    IF UserSetup.GET(USERID) THEN BEGIN
    MESSAGE(UserSetup."User ID");
    IF (UserSetup."Global Dimension 1 Code" <> '') THEN BEGIN
    FILTERGROUP := 2;
    SETRANGE("Global Dimension 1 Code",UserSetup."Global Dimension 1 Code");
    FILTERGROUP := 0;
    END;

    END;
    and put in on next trigger of form as following
    "Global Dimension 1 Code":=UserSetup."Global Dimension 1 Code";
    as user setup is user setup table i defined as record
    but not work why
Sign In or Register to comment.