Multiselect

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #987
    BuddyImLost
    Participant

      I saw a good post here on how to pass in a currently select record from an action menu item to the backing class. This worked great but did not allow me to select more than one record – how can I loop over more than one record if I selected more than one before clicking my custom action menu item button?

      #1020
      BuddyImLost
      Participant

        I got something like this to work!

        public class CustMultiSelectController
        {

        public static void main(Args _args)
        {
        if (!_args.record() ||
        _args.dataset() != tableNum(SalesTable))
        {
        throw error(Error::wrongUseOfFunction(funcName()));
        }

        Common multiSelectionRecord;
        MultiSelectionContext multiSelectionContext;
        SalesTable salesTable;

        multiSelectionContext = _args.multiSelectionContext();

        if (multiSelectionContext)
        {
        multiSelectionRecord = multiSelectionContext.getFirst();

        while (multiSelectionRecord)
        {
        select forupdate firstonly salesTable
        where salesTable.RecId == multiSelectionRecord.RecId;

        info(strFmt(“%1”, salesTable.SalesId));

        multiSelectionRecord = multiSelectionContext.getNext();
        }

        }
        }
        }

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.
      D365 Tech Support