• santosh duvvuri
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

What happens when we try to create duplicate share records

Example code :

------------------------------------------------------------------------------------------------------------------------------------------------------------------

Id accountId ;

Id userId;



List<AccountShare> accountShareList = new List<AccountShare>();



// Creating a share record with edit access

AccountShare accShare = new AccountShare();

accShare.AccountId = accountId;

accShare.UserOrGroupId = userId;

accShare.AccessLevel = 'Edit';

accountShareList.add(accShare);



// Creating a share record with read access

accShare = new AccountShare();

accShare.AccountId = accountId;

accShare.UserOrGroupId = userId;

accShare.AccessLevel = 'Edit';

accountShareList.add(accShare);



insert accountShareList;



------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

1. Now the user will have which access Edit or Read

2. Can we insert two share records with same userorgroupid , accountid and accesslevel but different row cause?

3. Can we insert two share records with same userorgroupid and accountid but different accessleveland different row cause?

Hi All, Can any one tell me how to use custom settings to store error messages and use it in my apex class. Thanks & Regards Santosh Duvvuri

Hi All,

 

What is the difference between salesforce and Salesforce platform license?

 

Thanks

Santosh Duvvuri

Hi,

 

As you are aware that when we delete a record, we get a pop-up (salesforce's standard functionality) which confirms that if we really want to delete the record.

However, if you delete a Task you don't get any pop-up. So we wanted to show the pop-up on task delete event as well.

 

I implemented this requirement by overriding the "Delete" button with a Visualforce page.

Within the visualforce made use of AJAX.

<apex:page standardController="Task">

<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>

<script src="../../soap/ajax/20.0/connection.js" type="text/javascript"></script>

<script type="text/javascript">
window.onload = loadOnClick;

/*
Function Name : gup
Description: To get the value of a parameter in the URL
*/
function gup( name )
{ 
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
	var regexS = "[\\?&]"+name+"=([^&#]*)";  
	var regex = new RegExp(regexS );
	var results = regex.exec( window.location.href );  
	if( results == null )    
		return "";  
	else    
		return results[1];
}

/*
Function Name : gup
Description: Gets called on Delete button click. 
*/
function loadOnClick()
{     
	try{         
		var answer = confirm('Delete the Record?');         
		var taskRecordId = gup('delID');          
		if(answer)          
		{                       
			var delResult = sforce.connection.deleteIds([taskRecordId ]);               
			window.location='/home/home.jsp';          
		}else
		{                
			window.location='/'+taskRecordId;         
		}    
	}catch(err)
	{	
		alert(err);
	}
}

</script>

</apex:page>

 

 

 

 

Hi

 

I'm trying to create a trigger that fires when a formula field is updated.

 

My question is whether a formula field updating automatically (without the user entering the record and editing or saving) constitutes an UPDATE event that could fire a trigger?

 

Thanks,

 

Paul

Hi all,

We built an interface to an external system using SOAP Callouts that trigger upon update on a certain object ('object1'). In order to successfully do the SOAP callout, we needed to put the callout in an @Future context, because callouts are only allowed from @Future classes.

 

This works fine, but....

 

We also have some processes in place that, whenever a certain other object ('object2') is updated, updates the matching object1. Since there can be a lot (thousands)  of matches, we also made this an @Future method. 

 

The problem, however, is that @Future methods cannot call @Future methods, so whenever object1 gets updated because of an update on object2, the export callout does not get triggered.

 

We've tried multiple solutions:

- using Outbound Messages instead. This is not an option since the object that gets exported also draws data from child objects when composing the SOAP message 

- I tried creating a static variable that checks whether an @Future method was already started, and proactively determines whether or not to run the callout as another @Future, but that doesn't help because the system tells me "Callout from triggers are currently not supported." (there is not @Future between the trigger on the object and the callout).

 

Any other suggestions? We'd want the interface to stay as 'online' as possible, so we will only try time-based workflow or batch apex if nothing else helps..

 

Many thanks!

Guy 

 

I'm getting the attached error when attempting to install the latest Force.com IDE plugin on the latest Eclipse version with the latest JDK installed.  The error comes up after I click next on the "Available Software" selection screen of the "Install New Software" dialog.  How can I fix this problem?  Thank you!

 

 

Cannot complete the install because of a conflicting dependency.
  Software being installed: Force.com IDE 20.0.1.201011121559 (com.salesforce.ide.feature.feature.group 20.0.1.201011121559)
  Software currently installed: Shared profile 1.0.0.1284708747720 (SharedProfile_epp.package.java 1.0.0.1284708747720)
  Only one of the following can be installed at once: 
    Structured Source Editor 1.2.2.v201008232126 (org.eclipse.wst.sse.ui 1.2.2.v201008232126)
    Structured Source Editor 1.1.102.v200910200227 (org.eclipse.wst.sse.ui 1.1.102.v200910200227)
  Cannot satisfy dependency:
    From: Shared profile 1.0.0.1284708747720 (SharedProfile_epp.package.java 1.0.0.1284708747720)
    To: org.eclipse.wst.sse.ui [1.2.2.v201008232126]
  Cannot satisfy dependency:
    From: Force.com IDE 20.0.1.201011121559 (com.salesforce.ide.feature.feature.group 20.0.1.201011121559)
    To: org.eclipse.wst.html.ui [1.0.0,2.0.0)
  Cannot satisfy dependency:
    From: HTML UI Source Editor 1.0.401.v200908111935 (org.eclipse.wst.html.ui 1.0.401.v200908111935)
    To: bundle org.eclipse.wst.sse.ui [1.1.0,1.2.0)

 

 

  • February 03, 2011
  • Like
  • 0