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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Phantom Payment terms code. (paymenttermscode) - how to change it?

(1) ShareShare
ReportReport
Posted on by 6
Hi All 
 
Working on an integration using CS where terms need to be synced from another source.  There is an option set called paymenttermscode that contains these.  Our system of record calls for payment term ID #1 to be "credit hold" and dynamics is "Net 30".  Try as I might, I cannot get this change to stick. 
 
Via the XRM toolbox SQL4CDS , I can see that ID#1 is Net 30.  I cannot of course edit it there.  I have wiped all uses of paymenttermscode to null.  I visited each place it is referenced (account, contact, sales order, quote, invoice) and went into the option choice there.  I cleaned them out leaving just 1, "Credit Hold" with value of 1.
 
Even though none of the forms seem to have other data listed, the stringmaps seems to keep all the old ones.
 
If I use c# code to insert it as #1 it fails saying it's already there - which it isn't via the web UI but IS via the string maps.
 
Dataverse.InsertOptionValue(serviceClient, "account", "paymenttermscode", 1, "Credit Hold");
 
Is there some weird hardcode on net30 as ID1? Has anyone been successful in doing anything like this? It's very frustrating.
 
Dataverse.InsertOptionValue(serviceClient, "account", "paymenttermscode", 1, "Credit Hold");

        public static int? DeleteOptionValue(ServiceClient sc, string entityLogicalName, string attributeLogicalName, int value)
        {
            int? ret = null;
            try
            {

                var deleteOptionValueRequest = new DeleteOptionValueRequest
                {
                    EntityLogicalName = entityLogicalName,
                    AttributeLogicalName = attributeLogicalName,
                    Value = value,
                };

                var res = (DeleteOptionValueResponse)sc.Execute(deleteOptionValueRequest);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }

            return ret;

        }
 
  • DA-28061355-0 Profile Picture
    6 on at
    also, noting that when I went in and fully defined terms maually to seed things that things don't seem to be matching the stringmaps table.  Is this table created periodically?

    I then went to my "default" area and did a "publish all customizations" which carried all the data forward.  Wondering how I trigger that in code.

    The reality is that I don't really want these terms to be so hard coded.  I hate how embedded they are, I would like just to have it be a linked table.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 109 Super User 2026 Season 2

#2
Syed Aqib Raza Profile Picture

Syed Aqib Raza 88

#3
ParthPatel249 Profile Picture

ParthPatel249 82

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans