10

No, there's no way to tell if a key exists or not. We don't have access to "containsKey", and any attempt to reference a key that doesn't exist will cause your code to crash and burn catastrophically. Visualforce Error Help for this Page Map key 'value' not found in map Error is in expression '{!not(isnull(keys[key]))}' in component <something> in ...


10

If you're using Salesforce to Salesforce to bring data from your customers org into Salesforce you're going to run into two scalability issues. First, Salesforce to Salesforce transactions count against your daily API limit. If you have a lot of orgs connecting to yours there is a very good chance you could start exceeding your daily limit. Second, ...


7

S2S sounds like a good choice for this. It works well. Couple notes: doesn't sound like an issue for you, but some core objects (most painfully for us, Campaigns and Campaign Members) are still not supported. S2S has no relation to sharing rules; as mentioned by zjeh, you either manually forward them (click a button in a list view) or auto-share via trigger....


6

You should really keep this type of logic out of a Visualforce page. A Visualforce page should be used simply for View logic. Instead, add it as part of your controller: Apex public Boolean getRenderPageBlockTable(){ return mapToCheck.containsKey('keyToCheck'); } Visualforce <apex:pageBlockSection rendered="{!renderPageBlockTable}"> ... <...


6

While this won't handle the authorization (oAuth setup) bit, here's a gist that you can use as a basic RestClient. This is a Virtual class, so you'll need to create your own class and extend this rest class. Once you do that, you'll have access to Get(), Put(), Post(), etc. Including the ability to set Oauth and Authorization headers needed for Salesforce ...


5

I have not used a S2S connection yet, but was looking into it recently for an upcoming use case. According to Salesforce docs, ... There are two ways to share records: forward records directly to connections, or assign records to a queue of connections. You can share the same records with multiple connections. Once shared, connections must choose to ...


5

Yes - you can absolutely do this. Use the 'Salesforce' authentication provider to provide login from a 'source' org to a 'target' org, and, in the target org, you can access an access token to call APIs back in the 'source' org. This is how FinancialForce run their customer support portal. There was a session covering this at Dreamforce 2012, and Stephen ...


4

I agree with PepeFloyd -- If you're just looking to copy data then you could use an app like SFXOrgData (http://www.sfApex.com) to do this. I developed this application specifically for this purpose. It lets you connect to your source org (could be Sandbox or Production) and your target org (again could be Sandbox or Production). I do like the idea of using ...


4

This cookbook article, Calling Salesforce Web Services Using Apex shows how to import the Partner API into Apex. You can then call the query and insert operations on that service to communicate with another org. Let me know if this is something you want to explore, I've been having some success with getting the SF SOAP API's working from Apex recently! ;-) ...


4

Wow, lots of questions. Let me see what I can say: If I have multiple developers working on a web application called XYZ, simultaneously on the same code base, using the Force.com platform then is Partner Developer Edition the only way for team development or is there an alternate way? Perhaps using the Force IDE and a local SVN repository locally to ...


4

Here status invite means the record you have just shared is not created in organization and require other organization owner to accept the record. When you create record by this, an invitation email is sent to connection owner with a link to records you are inserting/updating to organization. On that link connection owner accept or decline the record ...


4

/*End point Url to web service callout*/ private final static String ENP_POINT_URL ='https://login.salesforce.com/services/oauth2/token'; //For development and production https://login.salesforce.com/services/oauth2/token //And for sandbox https://test.salesforce.com/services/oauth2/token private final static String CONSUMER_KEY = 'Your_Org_Consumer_Key'; ...


4

Your problem is that it calls the constructor of your controller before to assign your attribute on your component ==> your incomingEventID is null. Better to NOT pass by your constructor and query your lead into your get method. I got this issue before as well. That should fix your problem : public class emailCtrl{ public Id incomingEventID {...


4

when I checked Generate Authorization Header check box on Named Credential then error went off.


4

Salesforce to Salesforce is notoriously difficult to test in a non-SeeAllData=true style as you can't successfully mock PartnerNetworkRecordConnection or PartnerNetworkConnection as you might want. This extends to setting values of connectionReceivedId or connectionSentId in Sobjects An alternate framework solution using interfaces; things can get more ...


3

Based on the API, and confirmed by this comment from Salesforce Product Manager John Kucera, Chatter records can't be shared per se via S2S (yet). That said, if I had this requirement I would probably create a Detail object under Lead that acts as a proxy for the LeadFeed. You write a trigger on FeedItem that, when the chatter post meets your criteria (e.g. ...


3

Actually, you can build that natively on Visualforce Page, without any further variables. You need to use an apex:repeat, iterate over it, and inside the apex:repeat you may use an outputText (or similar and render the outputText just in case the iterated value matches your expected value. For example: <apex:repeat value="{!yourMapVariable}" var="key">...


3

You can build a delimited string with all the keys of the map in controller and then you use SF formula CONTAINS(delimited_string_with_map_keys, key) in a rendered condition display map values with the key.


3

You will not need to buy licenses for each individual developer. Instead they would use a combination of developer organization (essentially these are sandboxes for development and testing of code). Salesforce also has the idea of an actual salesforce sandbox which is a copy of a production/paid Salesforce org. that contains the data/source-code ...


3

Chatter PM mentioned above here. If you have budget, these guys recently built a Chatter migrator: http://appexchange.salesforce.com/listingDetail?listingId=a0N30000009wK2yEAE All approaches have various tradeoffs, and I think the biggest things to think about: 1) How many posts & comments do you get / day? API calls are higher for real time sync vs....


3

By default the records which are copied from the source org (publisher) to the target org (subscriber) are owned by the connection user defined within the S2S configuration in the target org. The target org is responsible for determining and granting access to these copied records as well as changing ownership of them as necessary. The sharing model that ...


3

The Partner WSDL contains XML Schema features that are not supported by the WSDL2Apex tool, specifically in the case of the sObject type, it uses the any attribute. <complexType name="sObject"> <sequence> <element name="type" type="xsd:string"/> <element name="...


3

Looks like Salesforce to Salesforce syncing can fail if two updates to the same record occurs within a short time frame. It seems that this issue is caused by a problem in the way their core messaging queue works. As I understand it, if an update message has already been queued for a particular record when another update occurs to the same record, another ...


3

The trick here is in the warning message that is included in the sobjectPartnerSoapSforceCom class: //Warning: '<xsd:any>' element type has been changed to dataType List<DOM.XmlNode> called anyElement Natively WebServiceCallout.invoke can't handle the <xsd:any> that appears in the WSDL for sObjects. See Supported WSDL Features. I've ...


3

You can capture all the necessary DUNS_Number__c in a set and use the set to fetch your accounts //rest of your code set<String> setDNSNo = new set<String>(); for(Contact c :SELECT id, DUNS_Number__c FROM Contact WHERE id IN :unparentedcontacts){ setDNSNo.add(c....


3

To test things like this, I create a class that mimics the object. During the test I deserialize the class into a list of those objects. In the code that the trigger calls, I check for a static test property to be true and if so then get the test objects instead of database object. It allows you to test the functionality of that piece (sorting, etc) while ...


3

You can write Apex Batch Class for doing the mass transfer. In the execute method you can insert the PartnerNetworkRecordConnection object. Below is the sample code i.e. not compiled for mass transferring the Account object if Publish and Subscribe is done in respective Org. global class ShareAccount implements Database.Batchable<sObject> { global ...


2

This sounds like a great use of Salesforce to Salesforce if you don't mind doing all the config to setup the connection. Salesforce to Salesforce only lets you connect sandbox orgs to other sandbox orgs, and production/dev orgs to other production/dev orgs, but there is no limitation for connecting two sandboxes related to the same production org to each ...


2

I would have answered more of your questions but the earlier answer by Scott VonSchilling covered most of it. All I have to add is... 1. If I have multiple developers working on a web application called XYZ, simultaneously on the same code base, using the Force.com platform then is Partner Developer Edition the only way for team development or is there an ...


2

You can use Date Literals in SOQL Queries. Assuming you meant 3 months, i.e. 90 days select id, Name, Owner.Name from CollaborationGroup where LastFeedModifiedDate < LAST_N_DAYS:90 If you wanted to filter on Owners too, add that to the where clause (ownerIds is a collection of UserIds you want to filter on) select id, Name, Owner.Name from ...


Only top voted, non community-wiki answers of a minimum length are eligible