Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Change sort of RM Apply Scroll

Posted on by Microsoft Employee

I need to change the sort of the RM Apply scroll by Current Trx Amount. I can add a virtual key to the RM_OPEN_TEMP but that value is always 0.00000. I tried to do this with pass-through sanScript with no luck. I have limited experience in Dex and would like suggestions for the event to trigger off to refill the scroll and why the temp table has such limited data. I know this is possible because there's a 3rd party RM Apply that has additional sorts but not by amount.

thanks in advance for your assistance.

Kevin Vogler

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    I was able to get it done by releasing table. thank you for your help.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    I'm not sure why you're getting that error. I'm not really an experienced Dex person. You may have to get help elsewhere.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    I did pass all key on temp table also i pass warning so we how many records it only finds 1 row back but it is still giving the save error

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    Look at the key on the Temp table and make sure that you're populating those fields if they're empty. Also, you may have to change your WHERE clause to include a few more of those fields. You could be getting more than one row back.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    I changed now I am getting error at time of saving into " save table RM_OPEN_TEMP;" duplicate key error:

    local 'Current Trx Amount' curr;

    local 'Due Date' due;

    local 'Document Date' doc;

    local 'RM Document Type-All' rm;

    local integer virtual_key2;

    local reference InventoryTable2;

    InventoryTable2 = Table_OpenNewBuffer(table RM_OPEN);

    range clear table RM_OPEN_TEMP;

    get first table RM_OPEN_TEMP by number 1;

    while err() <> EOF do

    range table (InventoryTable2) where

    physicalname('Document Number' of table (InventoryTable2)) + CH_SPACE + CH_EQUAL + CH_SPACE +

    SQL_FormatStrings('Document Number' of table RM_OPEN_TEMP) ;

    get first table (InventoryTable2);

    if err(table (InventoryTable2)) = OKAY then

    curr = 'Current Trx Amount' of table (InventoryTable2);

    due= 'Due Date' of table (InventoryTable2);

    doc='Document Date'  of table (InventoryTable2);

    rm='RM Document Type-All' of table (InventoryTable2);

       check error;    

    else

    curr = 0;

    end if;

    'Current Trx Amount' of table RM_OPEN_TEMP = curr;

    'Due Date' of table RM_OPEN_TEMP = due;

    'Document Date' of table RM_OPEN_TEMP = doc;

    'RM Document Type-All' of table RM_OPEN_TEMP = rm;

    save table RM_OPEN_TEMP;

    check error;  

    get next table RM_OPEN_TEMP;

    end while;

    range clear table RM_OPEN_TEMP;

    get first table RM_OPEN_TEMP by number 1;

    while err() <> EOF do

    warning str( 'Current Trx Amount' of table RM_OPEN_TEMP);

    get next table RM_OPEN_TEMP;

    end while;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    Don't loop through the InventoryTable2 use a range where on Document Number = RM_OPEN_TEMP Document Number

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    Yes I am not updating RM_Open

    but I get error on get next table . Below is my code:

    local reference InventoryTable2;

    InventoryTable2 = Table_OpenNewBuffer(table RM_OPEN);

    range clear table RM_OPEN_TEMP;

    get first table RM_OPEN_TEMP by number 1;

    while err() <> EOF do

    range clear table (InventoryTable2);

    get first table (InventoryTable2) by number 1;

    while err() <> EOF do

    if 'Document Number' of table RM_OPEN_TEMP = 'Document Number' of table (InventoryTable2) then

    'Current Trx Amount' of table RM_OPEN_TEMP = 'Current Trx Amount' of table (InventoryTable2);

    'Due Date' of table RM_OPEN_TEMP = 'Due Date' of table (InventoryTable2);

    'Document Date' of table RM_OPEN_TEMP = 'Document Date'  of table (InventoryTable2);

    'RM Document Type-All' of table RM_OPEN_TEMP='RM Document Type-All' of table (InventoryTable2);

    end if;

    get next table (InventoryTable2) by number 1;

    end while;

    get next table RM_OPEN_TEMP by number 1;

    end while;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    You should only read from RM_OPEN and update RM_OPEN_TEMP.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    Yes I was able to clear the error using:

    local reference InventoryTable2;
    InventoryTable2 = Table_OpenNewBuffer(table RM_OPEN);

    range clear table RM_OPEN_TEMP;
    get first table RM_OPEN_TEMP;

    while err() <> EOF do
    range clear table (InventoryTable2);
    get first table (InventoryTable2) by number 1;
    while err() <> EOF do

    but not I get error on RM_OPEN same cant perform get/change

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change sort of RM Apply Scroll

    this is how I'm doing it. I've never gotten any errors.

    get first table RM_OPEN_TEMP by number 1;

    while err() <> EOF do

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans