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 :
Microsoft Dynamics CRM (Archived)

"statecode" and "statuscode" related issue while creating product by using postman

(0) ShareShare
ReportReport
Posted on by

Hi All,

I am using the following body part to create product.

{
"statecode": 0,
"iskit": false,
"description": "Soft and sweet",
"productnumber": "l1",
"msdyn_taxable": true,
"producttypecode": 1,
"name": "Audi",
"isstockitem": false,
"msdyn_converttocustomerasset": false,
"productstructure": 1,
"defaultuomscheduleid@odata.bind": "/uoms(046f8e2c-9005-e811-a958-000d3af28edd)",
"defaultuomid@odata.bind": "/uoms(056f8e2c-9005-e811-a958-000d3af28edd)",
"versionnumber": 1363537,
"exchangerate": 1,
"statuscode": 1,
"quantitydecimal": 0,
"price": 350000,
"msdyn_purchasename": "Audi"
}

As, you can see i am sending "statecode": 0 i.e. "Active". Unfortunately, it is taking "statecode": 2 by default, I don't know why it is happening. Can anyone tell me why it is happening? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    By default in Dynamics CRM create a record will always  active state. I don't understand why you are are sending them with the JSON. Is there any requirement?

    Try with remove all tag of statecode and statuscode from json.

    If its not resolved then seems  any plugin or workflow is triggering  in the background.

    thanks

    Goutam  

  • Verified answer
    Darshik Profile Picture
    295 on at

    Hi,

    By default your organisation setting for product creation is inactive state.

    go to Setting-> System administrator -> go to Sales tab on the same "create products in active state" change this field from "No" to "Yes"

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    salesproduct.JPG

    Yes, Darshik is correct you can also check this option by go to Setting -> Admistration-->System Settings --> select Sales Tab.

    Please Mark as answer if it helps.

  • Community Member Profile Picture
    on at

    Thanks Darshik,

    it works

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans