Friday, December 30, 2016

ISV App Strategy

App Type

  1. ISVforce App
    • app that extend Sales or Service Cloud
    • can be sell only to existing Salesforce customer.
    • if we use some Salesforce licence dependencies feature, need to make sure the user also have licence from Salesforce.
    • our customer have to purchase the license from Salesforce
    • Licence type mostly Sales and Service cloud
  2. Force.com Embedded app (OEM Embedded app)
    • app that does not rely on Sales cloud or Service cloud functionality.
    • can be sell to existing customer or customer who does not use Salesforce at all.
    • have access to App Cloud platform.Although they have access to certain Sales and Service cloud object such Leads,Opportunities they can't surface those to customer.
    • by contract,Salesforce does not give permission to rebuild Sales or Service Cloud functionality within OEM Embedded app.
    • the licence is embedded in application for new customer and existing customer but existing customer can choose to assign their ISV app licence rather than using embedded user licence.
    • Licence type Force.com,Customer Community (optional) and Customer Community Plus(optional)
Both ISV application licences provided by partner.

Why would you want to build an ISVforce app instead of an OEM Embedded app?
The app displays data in Opportunity and Lead objects.


Why would you want to build an OEM Embedded app instead of an ISVforce app?
Your target customers may not already have Salesforce.


What kind of Salesforce licenses must be included in a OEM Embedded app?
Force.com


In your special partner DE org, you’ve created an app that you are ready to distribute. Displaying data from which object in your solution would prevent you from being able to use the OEM Embedded app type?
Case . We still can use Account and Contact in OEM Embedded app type.


Trailhead :Select an App Type

Thursday, December 29, 2016

Salesforce1 Mobile Basic : Creating Object-Specific Quick Actions

Five types of object-specific action:
  • Object-specific CREATE ACTION create records that are automatically associated with related records.
  • Object-specific UPDATE ACTION make it easy for users to edit records. You can define the fields that are available for update.
  • Object-specific LOG A CALL actions let users enter notes about calls, meetings, or other interactions that are related to a specific record.
  • Object-specific CUSTOM ACTIONS invoke Lightning components, Visualforce pages, or canvas apps that let users interact with or create records that have a relationship to an object record.The Visualforce page for an object-specific custom action must include the standard controller for the relevant object.
  • SEND EMAIL ACTION, available only on CASES, give users access to a simplified version of the Case Feed Email action on Salesforce1.

Wednesday, December 21, 2016

Entity is not api accessible when saving Apex class

Entity is not api accessible 

The error can be due to :

The object name is not stated correctly ,it happens when we use custom object we forgot to include __c :

Example : Use incorrectly MyObject instead of MyObject__c

Or some typo,I am not sure why it didnot give proper error but some of the typo below my cause some issue .Note service  is not declared in the code below.


Opportunity_Service  service1 = new Opportunity_Service();
List<Opportunity_Service.Result> results = service.run( opportunities);

Friday, December 09, 2016

System.UnsupportedOperationException: ConnectApi methods are not supported...


I am using ConnectorAPIHelper to post Chatter notification from apex code.When I run my apex test class it giving this exception :
System.UnsupportedOperationException: ConnectApi methods are not supported in data siloed tests. Please use @IsTest(SeeAllData=true).

It seems in order to cover the class that use ChatterApi, the test class need to be SeeAllData=true .

In my case, because I only have one line method that call ChatterApi , I think it's better use Test.isRunningTest instead of SeeAllData=true.


 public static void postChatter(){
     //exclude this from testing because in order to test ChatterApi ,we must set SeeAllData=true.
     //This class is test separately so it can be ignore for this testing.
     if(!Test.isRunningTest()){
          //send chatter notification
          ConnectApi.FeedItem fi = (ConnectApi.FeedItem)ConnectApiHelper.postFeedItemWithMentions(Network.getNetworkId(), 'me', 'Hi ,'+recipientChatter+ '-There has been an in Batch Job.Please check');
        }
    
    } 

More info please refer here .

Thursday, December 08, 2016

System.AsyncException: trigger must be associated with a job detail

System.AsyncException: trigger must be associated with a job detail
I am writing test class for schedule and bump into this exception.The reason is , make sure no space at jobName. The class can be call by :

System.schedule(jobName, cronExpression, schedulableClass) ;


Notice this will throw the exception . 'Opp_Update_Schedule 5.00 '


      // Schedule the test job
      String jobId = System.schedule('Opp_Update_Schedule 5.00 ',
                        CRON_EXP_DAY, 
                        new Opportunity_Update_Schedule(100));

This will not throw exception :'Opp_Update_Schedule 5.00'
      // Schedule the test job
      String jobId = System.schedule('Opp_Update_Schedule 5.00',
                        CRON_EXP_DAY, 
                        new Opportunity_Update_Schedule(100));
Have a nice day.