Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Need to set Value in SalesParmTable while doing PackingSlip of CreditNote

(0) ShareShare
ReportReport
Posted on by 112

Hello everyone,

I have one requirement , I have one customized field in salesParmTable i.e. ABC. I want to set my Customized field(ABC), as soon as i click on "Post Packing Slip" Button and my PackingSlipFOrm(SalesEditLines) form will get open.

I have placed that custom field on my form. So when that form will get open so my Custom field should have value, but only when i am doing packing slip for CreditNote(Negative Qunatity).

So, now my concern is how to set Value in my CustomField of SalesParmTable.

As, i debugged the code, and i found 1 class(SalesFormLetterParmData) and method(createParmLineRecord). As, this method used to create data in SalesParmLine. So i create COC for this class method, and after "next" i wrote If condition to check whether "DeliverNow" field of SalesParmLine Table is less than 0(Negative). But then i have to updateSalesParmTable. But i am not getting SalesParmTable at this method. i write below code to check for salesParmTable at this COC method.

select salesParmTable
where salesParmTable.ParmId == _salesParmLine.ParmId
&& salesParmTable.TableRefId == _salesParmLine.TableRefId;

Here we are getting _salesParmLine, but now i need salesParmTable also.

If my approach is wrong, please suggest me something.

Thanks in advance.

  • Suggested answer
    huijij Profile Picture
    huijij 19,811 on at
    RE: Need to set Value in SalesParmTable while doing PackingSlip of CreditNote

    Hi D365_FO_Technical_Te,

    I have a doubt, you said this field is custom in salesParmTable, and then want to see this field set Value on the form when you open the SalesEditLines form. however, for your description, you mentioned that you want to update the field value at this COC method, so are you trying to hardcode the field? Can you describe your real business requirements?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans