Community
Showing results for 
Search instead for 
Do you mean 
Reply

Problem with setting recordmanager when creating opportunities

Copper Contributor
Posts: 149
Country: Netherlands

Problem with setting recordmanager when creating opportunities

I'd like to set the opportunity recordmanager to, for instance, Betty Browser, while I'm using the API as user Chris Huffman.

How do I do this?

 

If I give the 'manager'  property (also tried the 'owner' property) like this below it's ignored and the record manager is 'Chris Huffman' (the user who is logged in into the API):

 

{
  "name": "TestvanuitPostmanRecmann",
  "actualCloseDate": "2018-04-10T12:49:20.582Z",
  "daysOpen": 4,
  "estimatedCloseDate": "2018-04-10T12:49:20.582Z",
  "isPrivate": true,
  "openDate": "2018-04-10T12:49:20.582Z",
  "probability": 0,
  "productTotal": 0,
  "status": "Open",
  "totalPerCompany": 0,
  "totalPerContact": 0,
  "totalPerGroup": 0,
  "weightedTotal": 0,
  "relatedEntitiesResolver": true,
  "created": "2018-04-10T12:49:20.582Z",
  "edited": "2018-04-10T12:49:20.582Z",
  "manager": "Betty Browser",
  "recordOwner": "Betty Browser"
}

 

How do we do this?

 

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Employee
Posts: 81
Country: USA

Re: Problem with setting recordmanager when creating opportunities

These fields are read-only properties to the API and are set by Act!.  The API does not have the ability to override Act! internal properties.

 

"created": "",
"edited": "",
"manager": "",
"recordOwner": ""

 

Employee
Posts: 81
Country: USA

Re: Problem with setting recordmanager when creating opportunities

Adding a correction to my comment.  This is possible, but I need to make a change to the API.  I will add this to the API.

Employee
Posts: 81
Country: USA

Re: Problem with setting recordmanager when creating opportunities

Released API v1.0.279.0 that has the fix for this issue.

 

https://www.act.com/download/download-act!-premium-v20

 

RecordManager is a new property you can set to modify the manager of an entity.  On the Opportunity, there is a Manager property that has been deprecated, you can still use it to set the record manager, but when you get a change, please change it to this new property.

New Member
Posts: 8
Country: USA

Re: Problem with setting recordmanager when creating opportunities

With this issue resolved, can you update these fields using a patch or a put? or is this only able to be set during instantiation?

Employee
Posts: 81
Country: USA

Re: Problem with setting recordmanager when creating opportunities

Yes, you should be able to update the record manager with a Patch|Put.

New Member
Posts: 8
Country: USA

Re: Problem with setting recordmanager when creating opportunities

My request is returning 200 but no changes. 

 

it looks something like this..

 

url

{Patch}

 

https://myacturl/act.web.api/api/contacts/{id}

 

body

 

{

    "id": {id},

    "recordManager": "Bob Henry"

}

 

upon my next GET nothing is changed.

 

should I be using the Record Manager User ID in this field?

 

We are currently working to migrate several integrations to use the API instead of the framework DLL's. I had everything set up in under a day except for this sticking point.

 

Thanks for your quick reply!

 

Employee
Posts: 81
Country: USA

Re: Problem with setting recordmanager when creating opportunities

I am about to duplicate the issue that you are seeing,  The API validates that the RecordManager is a valid user by calling the framework to get the user by the name that is in the request body, however it is always returning null.

 

     var manager = framework.Users.GetUser(contact.RecordManager);

 

There are two other overloads on the GetUser( ), one by passing the Contact and the other by passing the Contact ID.  I will change it to one of these to see If I can get it working...  I will bring this up at our 10:15 stand up to see if I can  get this change in a build today.

 

Stephen

New Member
Posts: 8
Country: USA

Re: Problem with setting recordmanager when creating opportunities

Well played sir!

 

I look forward to your response.

Employee
Posts: 81
Country: USA

Re: Problem with setting recordmanager when creating opportunities

Question for you.

 

Would it be possible for you to pass the user login name instead of the contact name?  The reason it is null, is because the response of the record manager is the contact name, but when setting the record manager is requires the login name.

 

However, this is still an issue, because the framework is throwing an exception when calling the SetRecordManager : Operation is not valid due to the current state of the object.  Working on a solution for this now, but just want to know if it was possible to pass the login name instead.