Hi i m using rest apis to register the customer, but after sending telephone number, the phone column not showing telephone number in the customer datagrid.
Solved! Go to Solution.
I have checked this and that is correct behavior , if you wanted to show that telephone number into customer grid , then the address you are passing must selected as a default_billing and default_shipping address.
so here you are passing the parameter that is correct but along with this you need to pass default_billing and default_shipping parameter with your address.
below is the updated parameters code :
{ "customer": { "email": "tesasast@gmail.com", "firstname": "uname", "lastname": "null", "default_billing": "true", "default_shipping": "true", "addresses": [ { "company": "xyz", "telephone": "2984923422", "firstname": "Hello", "lastname": "World", "street":[ "123 Main Street", "PO Box 321" ], "city":"test", "postcode":"12345", "countryId":"IN", "default_shipping": true, "default_billing": true } ] }, "password":"123123" }
Just copy above given parameters and replace with your one.
then check customer telephone will display in the grid.
it will works !
AKAIK , phone column is not available on standard magento 2 registration form screen.
still , could you please post here which URL you are calling ? and which parameters you are passing to create customer ?
post those details , so its helps us to troubleshoot the issue.
Im using rest api
{ "customer": { "email": "test@gmail.com", "firstname": "uname", "lastname": "null", "addresses": [
{
"company": "xyz",
"telephone": "2984923422",
"firstname": "Hello",
"lastname": "World",
"street":[
"123 Main Street",
"PO Box 321"
],
"city":"test",
"postcode":"12345",
"countryId":"IN"
}
] },"password":"123123" }
And phone column is showing in the admin side of the magento 2 customer panel but the telephone number is not showing up which was sent using the rest api.
I have checked this and that is correct behavior , if you wanted to show that telephone number into customer grid , then the address you are passing must selected as a default_billing and default_shipping address.
so here you are passing the parameter that is correct but along with this you need to pass default_billing and default_shipping parameter with your address.
below is the updated parameters code :
{ "customer": { "email": "tesasast@gmail.com", "firstname": "uname", "lastname": "null", "default_billing": "true", "default_shipping": "true", "addresses": [ { "company": "xyz", "telephone": "2984923422", "firstname": "Hello", "lastname": "World", "street":[ "123 Main Street", "PO Box 321" ], "city":"test", "postcode":"12345", "countryId":"IN", "default_shipping": true, "default_billing": true } ] }, "password":"123123" }
Just copy above given parameters and replace with your one.
then check customer telephone will display in the grid.
it will works !