web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Need workaround on customer's overloaded function 'CreateReservEntryFor'

(0) ShareShare
ReportReport
Posted on by 78

Hi all,

 

Our customer has another extension which has this overload on a 365 function-'CreateReservEntryFor' by adding one more parameter to it. Previously when we call this function in our code, we only need to pass 11 params. now to support this customer we have to pass 12 params. If we still pass 11 params, there could be error at this customer as ' The user-defined C/AL function 'CreateReservEntryFor' requires 12 parameters. It was called with 11 parameters. '.

 

Is there any workaround for our customer to make their new added parameter optional? Or is there any solution that we can make our code compatible to deal with both the original function and our customer's overload on this function?

 

Thanks!

 

Info:

 

Original function:

CreateReservEntryFor(ForType: Option, ForSubtype: Integer, ForID: Code[20], ForBatchName: Code[10], ForProdOrderLine: Integer, ForRefNo: Integer, ForQtyPerUOM: Decimal, Quantity: Decimal, QuantityBase: Decimal, ForSerialNo: Code[50], ForLotNo: Code[50])

 

Our customer's overload function:

CreateReservEntryFor(ForType: Option, ForSubtype: Integer, ForID: Code[20], ForBatchName: Code[10], ForProdOrderLine: Integer, ForRefNo: Integer, ForQtyPerUOM: Decimal, Quantity: Decimal, QuantityBase: Decimal, ForSerialNo: Code[50], ForLotNo: Code[50], NetWeight: Decimal)

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    133 on at

    Is the customer logging a net weight? If not and to just satisfy the functions parameter requirements pass in a 0.

    If this function is on an extension then you could look at creating it yourself and uninstall the original. I'd assume you have the source code given you have referenced old with new.

    I assume you know the answers here and just want clarification from others on what they would do. Personally I would pass the net weight from whatever source line table or by getting it from the item card for the item in question.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans