Skip to main content

Master Data Manager - close documents on a schedule

Answered

Comments

10 comments

  • SSP Automation
    Thank you for your request. It has been scheduled for review by the development team that will get back to you should there be questions.
    (Please note that as we are user-driven we can't guarantee that your request will be met unless it gets many votes and/or fit the product vision)
    Read more about the Feature Request process here
    [Internal Id: 46756]
  • Eduardo Garroux

    Can't you use an Schedule UF with C# Code, that use an Record.Set querying those open Orders and changing their DocStatus within DI API?

  • Hi Eduardo,

     

    Yes, we probably could, but I would need to get our developer onto that, and it would be good to have the feature available for less technical types :)

  • Sven de Keiser

    Hi, 

    Can you please provide an update on this topic? I also have a customer, who would like to automatically close all orders that have a linked picklist, as they don't want to have backorders.

    Thanks.

  • Rasmus Jensen

    So far this have not yet been planned, sorry, but remember to add your vote if not already done so :-(

  • Nick Jones

    I was about to make a feature request post for closing service calls on a schedule as well, i think this comes under the same banner though so am putting my vote in for this feature request.

    EDIT: Found what i needed. Still putting in my vote for closing sales orders on a schedule

  • Tez

    haha two votes in two days, what are the chances?

    This would be very useful to have, I have 27,000 open documents to close and would like to prevent the number ever reaching such magnitude in the future. 

    i will create a small addon to run this manually overnight, hopefully it is finished by morning 😅

    Thank You.

  • Rick Wynn

    I was also hoping that his functionality would be added to the Master Data Manger scheduler.  

    I have several clients that could use this feature.  I can see this being very useful on various types of documents.

  • Kathleen Payne

    Agreed.   I have had this come up yet again today and it would be so useful.   Any chance that adding this functionality to the Master Data Manger scheduler might be added to the B1UP roadmap?

  • Eduardo Garroux

    I don't know if I can put it here, but this can be easily done by creating a Dynamic Code (.Net SDK) UF with this simple code:

    Recordset oRSOrders = (Recordset)company.GetBusinessObject(BoObjectTypes.BoRecordset); //Recordset to run through the results of a given query

    //Recordset to get Orders from specified VIEW
    oRSOrders.DoQuery(String.Format("SELECT * FROM VW_CLOSEDOCUMENTS WHERE OBJTYPE = 22"));

    //run through all the documents from the view result
    while (!oRSOrders.EoF)
    {
      Documents doc = (Documents)company.GetBusinessObject(BoObjectTypes.oPurchaseOrders);
      doc.GetByKey(Convert.ToInt32(oRSOrders.Fields.Item("DOCENTRY").Value));
      int CloseDoc = doc.Close();
      if (CloseDoc == 0) 
      { 
          application.StatusBar.SetText(String.Format("Document closed with succes!"));
      } 
      else 
      { 
          int errCode = 0;
          string errMsg = "";
          company.GetLastError(out errCode, out errMsg);
          application.StatusBar.SetText(String.Format("Error closing document: [{0}] - {1}",errCode, errMsg), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success);
      }
    oRSOrders.MoveNext();
    }

    All you need to do after creating the UF is to Create a UF Schedule and set up it to run daily or set it up on a menu for user run it manually.

    What it is doing is closing all PurchaseOrders based on a VIEW called "VW_CLOSDOCUMENTS" (which need to be created with the desired filtes)...

Please sign in to leave a comment.