• Hey_You
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

Once I've set the visibility on a custom object, is there a way of updating it?  Say I forgot to give Chatter users access to a custom object at the time of the custom object creation, how can I update this after the fact?

Hello,

 

I have a custom object that's on the detail side of a master-detail relationship with opportunities (Master: oppty; detail: custom object).  I now know that a Chatter+ / Chatter Only user cannot see this custom object, because it is linked to the opportunity object.  Chatter+ users don't have access to opportunities.

 

My question is, if I replace the relationship from a master-detail (oppty-custom object) to a lookup relationship from the custom object to the oppty, will this get around the issue, or will the custom object still not be visible to the Chatter+ user?

 

In other words, is the only way I can make a Chatter+ user see the custom object, by removing any reference to the oppty object?

 

I have hope for good news....

Once I've set the visibility on a custom object, is there a way of updating it?  Say I forgot to give Chatter users access to a custom object at the time of the custom object creation, how can I update this after the fact?

I"m trying to create a custom button on a case (attached to an opportunity), to add over the contact roles which are associated to that oppty to the case. Here's the code I have but I'm not sure how to amend it to work for all contact roles and not just the primary.

 

{!requireScript("/soap/ajax/19.0/connection.js")}

function getBaseURL() {
//This function will return the base part of the current window's URL without the trailing slash.
//Example Return Value: "https://na1.salesforce.com"

	var fullURL = window.parent.location.href;
	var slashPosition = fullURL.indexOf("/", 9);
	var baseURL;
	
	if (slashPosition < 0)
		baseURL = fullURL;
	else
		baseURL = fullURL.substr(0, slashPosition);
		
	return baseURL;
}

function doQuery() {
	var result = sforce.connection.query("select Id, OpportunityId, ContactId, Role, IsPrimary from OpportunityContactRole where OpportunityId = '{!opportunity.id}' and IsPrimary = true");
	var records = result.getArray("records");

	if (records.length > 0)
		window.parent.location.href = getBaseURL() + "/_ui/core/email/author/EmailAuthor?p2_lkid=" + records[0].ContactId + "&rtype=003&p3_lkid={!opportunity.id}&retURL=%2F{!opportunity.id}";
	else
		if (confirm("ERROR: There is no Primary Contact specified yet for this opportunity. Click OK to specify one now."))
			window.parent.location.href = getBaseURL() + "/p/opp/ContactRoleEditUi/e?oppid={!opportunity.id}&retURL=%2F{!opportunity.id}";
}

doQuery();