Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

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

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
    DA-28061355-0 6 on at
    Phantom Payment terms code. (paymenttermscode) - how to change it?
    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

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,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans