Skip to main content

Notifications

Supply chain | Supply Chain Management, Commerce
Suggested answer

Credit & Collection

Posted on by 1,865
Hi Community Members,
 
I have a task to update Terms of payment  like "Terms of payment" and "New Terms of payment" of customer same as "Credit Limit" and "New Credit Limit" as Credit Limit Adjustment.
 
 
 
I want to know from where I should start and which classes, tables, forms etc. should consider.
 
Thanks,
Faiz
  • faiz7049 Profile Picture
    faiz7049 1,865 on at
    Credit & Collection
    Hi Bill,
     
    Thank you for support. Yes, customization is done only need to check workflow will work after this customization because Credit Limit Adjustment form has default workflow.

    Thank,
    Faiz
  • Suggested answer
    Bill Ngo Profile Picture
    Bill Ngo 368 on at
    Credit & Collection
    Hi faiz7049,
     
    Oh, you did a great job. so you are done your customzation, right?

    In case if you can't extend any class like this, then you can use a separate button to update the new term of payment.
     
     
    Best Rgds,
    Bill
     
  • Suggested answer
    faiz7049 Profile Picture
    faiz7049 1,865 on at
    Credit & Collection
    Hi Bill,
     
    Thank you. By display method I got the previous Terms of payment from customer.
  • faiz7049 Profile Picture
    faiz7049 1,865 on at
    Credit & Collection
    Hi Bill,
     
    It's working with below code now only remaining how to get existing Terms of payment to form. Please guide me on this.
     
     
       [ExtensionOf(classStr(CredManCreditLimitAdjCheckPost))]
       final class SFA_CredManCreditLimitAdjCheckPost_Class_Extension
    {
        
    
      
        protected void updateCreditLimitCustTable()
        {
               
            next updateCreditLimitCustTable();
            {
            
                CustTable                                    custTable;
                CredManCreditLimitAdjTrans                       creditLimitAdjTrans;
                CredManCreditLimitAdjTable                      creditLimitAdjTable;
                container packedData                            = this.pack();
                CredManCreditLimitAdjustmentJournalId journalId = conPeek(packedData, 2);
              
                
                custTable.skipDataMethods(true);
    
                
                      update_recordset custTable
                        setting
                       
                            PaymTermId = creditLimitAdjTrans.NewPaymTermId // SFA Add this line
                            
                        join creditLimitAdjTrans
                            where creditLimitAdjTrans.CustAccount == custTable.AccountNum
                    && creditLimitAdjTrans.JournalId == journalId; 
             
            }     
        
        }
    
    }
     
  • faiz7049 Profile Picture
    faiz7049 1,865 on at
    Credit & Collection
    Hi Bill,
     
    I have updated the method but it's saying journalId is private.
     
  • faiz7049 Profile Picture
    faiz7049 1,865 on at
    Credit & Collection
    Hi Bill,

    After putting JournalId =="IN-6000004" but how to get journalId since it is private and also previous Terms Of Payment not displaying 

       [ExtensionOf(classStr(CredManCreditLimitAdjCheckPost))]
        final class SFA_CredManCreditLimitAdjCheckPost_Class_Extension
        {
    
      
            protected void updateCreditLimitCustTable()
            {
                
                next updateCreditLimitCustTable();
    
            CustTable                       custTable;
            CredManCreditLimitAdjTrans      creditLimitAdjTrans;
            CredManCreditLimitAdjTable      creditLimitAdjTable;
                        update_recordset custTable
                        setting
                       
                            PaymTermId = creditLimitAdjTrans.NewPaymTermId // SFA Add this line
                        join creditLimitAdjTrans
                            where creditLimitAdjTrans.CustAccount == custTable.AccountNum
                && creditLimitAdjTrans.JournalId == 'IN-60000004';
                    
                }   
    
    
    
         }

  • faiz7049 Profile Picture
    faiz7049 1,865 on at
    Credit & Collection
    Thank you Bill,
     
    I will do same as you suggested and will update you.
  • Suggested answer
    Bill Ngo Profile Picture
    Bill Ngo 368 on at
    Credit & Collection
    Hi Faiz,
     
    Thanks for your more detailed description. I've got your points.
     
    You can practice as following steps, if there are any missing pls let me know.
     
    Create a new project and add your Model:
     
    1. Check your Model and update parameter with Credit Management in Model Management.
    2. Extend your CredManCreditLimitAdjTrans table and add two fields for
    -  Terms of payment (copy from CustTable)
    -  New terms of payment (duplicate from Terms of payment and add new name in label)
    3. Extend your CredManCreditLimitAdjTrans form. Add two new fields into grid. 
     
    4. Create a new class <anyname> to Extend CredManCreditLimitAdjCheckPost class to modify following methods in new class. in order to update back to Custtable you should add addtional fields in red area color below:
     
    5. Build and run for checking:
    Hope you can do it succesfully by yourselve. 
     
    Rgds,
    Bill
     
     
     
     
  • faiz7049 Profile Picture
    faiz7049 1,865 on at
    Credit & Collection
    Hi Andre,
     
    Thank you for reply.Yes, requirement is to add Terms of payment option together with credit limit 
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,232 Super User 2024 Season 2 on at
    Credit & Collection
    Hi Faiz,
     
    Do you need a full new feature for only the Terms of Payment or is the requirement to add the option to change the Terms of Payment together with the current credit limit adjustments?

    It seems like you already found some objects. I haven't done a similar customization so don't know exactly what objects are related here. You can use cross reference tooling to find all related objects. Then you can check where and how to create your solution or extend the current one.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,232 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,064 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans