web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Community Member Profile Picture
    on at
    RE: "statecode" and "statuscode" related issue while creating product by using postman

    Thanks Darshik,

    it works

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: "statecode" and "statuscode" related issue while creating product by using postman

    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.

  • Verified answer
    Darshik Profile Picture
    295 on at
    RE: "statecode" and "statuscode" related issue while creating product by using postman

    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"

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: "statecode" and "statuscode" related issue while creating product by using postman

    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  

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans