Skip to main content
Solved

Unable to make Customer Contact as primary except for the First record through API call


jinin
Pro I
Forum|alt.badge.img+11


Hello Everyone,

I am trying to make a  customer contact as primary through API call. But it is working for the first entered contact. Unable to set another contact. 

Could you please review and share your feedback?
 


 

Best answer by jinin

Hi @Chris Hackett 

We did an alternate solution to fix the issue. Instead of using Contact Name in the request, used contactID, 

 

View original
Did this topic help you find an answer to your question?

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • August 19, 2022

I tried like below,

Url :/entity/Test/20.200.001/Customer/makeContactPrimary
Method: POST

Request:
{

    "entity": {

        "CustomerID": {

            "value": "AACUSTOMER"

        }

    },

    "parameters": {

        "Contact": {                     // Tried with contactID too

            "value": "Andy Appleton"

        },
         "Primary": {

            "value": true

        }

      

    }

}


Naveen Boga
Captain II
Forum|alt.badge.img+19

Hi @jinin  Have you tried by setting the Name under the Primary Contact section? instead setting Primary = true at the Contacts tab.

 

 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • August 19, 2022

Yes Naveen already verified,   If we use the Primary name as the  ContactID with customer update call, It will work. But the Primary name as the Contact name is not working. 
 


 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • October 31, 2022

Hi @jinin - were you able to find a solution? Thank you!


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • November 1, 2022

Hi @Chris Hackett 

We did an alternate solution to fix the issue. Instead of using Contact Name in the request, used contactID, 

 


abrunner78
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • March 18, 2025

@jinin, I’m trying to do the same thing you have done, select a customer’s contact and set them as the primary, could you give a bit more detail about how you got it to work?

You are using a PUT? Does that mean you aren’t using the action makePrimaryContact and if not what are you setting?

Did you have to add anything to you endpoint?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • March 18, 2025

Hi ​@abrunner78 ,

I used the PUT method and included the Primary Contact ID in the request.

Method: PUT
Url: .../entity/Default/24.200.001/Customer

Sample Request:
{

    "CustomerID": {

        "value": "CUST000027"

    },

    "PrimaryContactID": {

        "value": 101043

    }

}


abrunner78
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • March 18, 2025

@jinin, Thanks for you help. I was trying to do this on an older endpoint that didn’t include the “PrimaryContactID”. 

Now it’s working as expected. Thanks for your response. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings