function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BlandgerBlandger 

How to get User that is in the 'Sales Team' list (OpportunityTeamMember) ?

I want to get 'User' that is in the 'Sales Team' list for the particular Opportunity. User has already assigned to the Opportunity using WEB-UI.

How to check if it exists and get it using WS API? I'd like to get it using 'OpportunityId' and 'Team Role' name for it.



There is little info about 'OpportunityTeamMember' in the API book. I suppose 'OpportunityTeamMember' should be used in my case. Correct me if I'm wrong.

-----------
'OpportunityTeamMember' - Represents an individual User on the sales team of a particular Opportunity.
For a complete list of fields in this object, see the Enterprise WSDL...

OpportunityTeamMember Fields:
OpportunityId, UserId, TeamMemberRole

In the salesforce.com user interface, users can set up a sales team for the opportunities they own. The sales team includes other users that are working on the Opportunity with them. The OpportunityTeamMember object is available only in organizations that have enabled the team selling functionality.
-----------

What doest it mean (The OpportunityTeamMember object is available only in organizations that have enabled the team selling functionality) ?

There is no 'OpportunityTeamMember' in the WSDL. I can't make a query for that entity as I'm getting error 'no deserialiser for the OpportunityTeamMember' (it's correct).

How can I get such 'Sales team member' having 'OpportunityId' and 'Team Role' name correctly?
DevAngelDevAngel

You will need to enable Team Selling.  You can do this in Studio.  Expand Customize, and Opportunities.  Click the Opportunity Team Selling link and then enable this feature.  OpportunityTeamMember will now show in your wsdl.

 

BlandgerBlandger
Hi.

I did as you have said. I got new OpportunityTeamMember java file.

I tried to execute SQL:
select Id, teamMemberRole, opportunityId, userId from OpportunityTeamMember where opportunityId = '006300000022HBu'

but I got error:

org.xml.sax.SAXException: No deserializer for {urn:sobject.enterprise.soap.sforce.com}OpportunityTeamMember
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: No deserializer for {urn:sobject.enterprise.soap.sforce.com}OpportunityTeamMember
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: org.xml.sax.SAXException: No deserializer for {urn:sobject.enterprise.soap.sforce.com}OpportunityTeamMember
at org.apache.axis.encoding.DeserializerImpl.onStartElement(DeserializerImpl.java:485)

What do you think about it?
DevAngelDevAngel

Hi Blandger,

I looks like you haven't regenerated your java code.  That error is thrown when the soap stack is trying to marshal the response into an object that is not defined .

BlandgerBlandger
Hi.

You was right. I have an old 'SoapBindingStub.java' source. I took newly generated one and it works fine for me now.

I have one more question. How to check programmatically (via WS) if 'Team Selling' is enabled for the current sforce account?

Thanks.
BlandgerBlandger
Is it possible check 'Session Timeout' value using web-service call?

I mean timeout assigned in:
Setup -> Security Controls -> Session Timeout.
I'm assuming that value is equal to WS calling 'Session Timeout'.

Is it correct? How to check it?


Thanks.
DevAngelDevAngel

No, we don't have any api calls that will return the session timeout value.  Sounds like a reasonable feature request to have that value added to the userInfo return values though.

Log a support case to file a feature request.

BlandgerBlandger
Hi Dave.

Thanks for your replay.
What is about previous question?

How to check if 'Team selling' is enabled?

Is is possible to accomplish using web-service calls?


Thanks.
khartneykhartney

Hi Dave,  Since you posted your reply almost a year ago, I thought I would check to see if this has been added to the API functionality yet?  If not, do you know if it is planned to be added and if so, when?

In addition, would there be a way to alter the setting through the API?  I need to have some applications connected potentially longer than what we want our user timeout session to be, so it would be useful to alter the timeout at the start of my application and then change it back.

Thanks.