Order Management

Get Involved. Join the Conversation.

Topic

    Hamzeh Al Karmi
    Unable to modify the value Product Number on Start and End...Answered
    Topic posted May 14, 2019 by Hamzeh Al KarmiSilver Medal: 2,000+ Points, last edited May 14, 2019 
    67 Views, 2 Comments
    Title:
    Unable to modify the value Product Number on Start and End Submit via script
    Summary:
    Unable to modify the value Product Number on Start and End Submit in the Order Management Extension screen
    Content:

    Hello all,

    I have the below script which supposedly lets the system update the value of the field "Allow Partial Shipments of Lines" to No among another field.

    def SDetails = header.getAttribute("Lines");                
    while( SDetails.hasNext() ) { 
    def line = SDetails.next();                              
    def itemNumber = line.getAttribute("ProductNumber");
    def PartialShipFlag = line.setAttribute("HeaderPartialShipAllowedFlag", "No");
    def AutoDefine = line.setAttribute("ShipSetName", itemNumber);

    The error generated is this:

    “JBO-DOO:::DOO_CX_INVALID_UPDATE: <MESSAGE><NUMBER>DOO-2685897</NUMBER><TEXT>The extension Order-Extension cannot update attribute ShipSetName, of entity Line, during event On End of Submission Request, because this attribute is read-only.</TEXT><CAUSE></CAUSE><ACTION></ACTION><DETAILS></DETAILS><INCIDENT></INCIDENT></MESSAGE>”

    Is there a workaround?

    Best Comment

    Venkatesh Malapati

    It looks like you have the extension implemented at the event, "On End of Submission Request" instead of "on save" or On Start of Submission Request. Attributes are not allowed to be modified at the "On End of Submission Request" event as all the attributes are read only at this event. Please have the extension implemented either as "on-save" or "On Start of Submission Request".

     

    Also it is not clear why the item number is being copied into the ship set name. Are you trying to group all of the items with the same item number into a ship set?

    Also there is no attribute by the name HeaderPartialShipAllowedFlag either on the header or line and instead it is named as PartialShipAllowedFlag.

    Comment

     

    • Venkatesh Malapati

      It looks like you have the extension implemented at the event, "On End of Submission Request" instead of "on save" or On Start of Submission Request. Attributes are not allowed to be modified at the "On End of Submission Request" event as all the attributes are read only at this event. Please have the extension implemented either as "on-save" or "On Start of Submission Request".

       

      Also it is not clear why the item number is being copied into the ship set name. Are you trying to group all of the items with the same item number into a ship set?

      Also there is no attribute by the name HeaderPartialShipAllowedFlag either on the header or line and instead it is named as PartialShipAllowedFlag.

    • Hamzeh Al Karmi

      Hello Venkatesh,

      Thank you :)