January 31, 2020

How to automate product schedule to Opportunity Product in Salesforce?

1. Create a Product record and enable Revenue Scheduling Enabled, Monthly for Revenue Installment Period, Divide Amount into multiple installments for Revenue Schedule Type and 12 as Number of Revenue Installments.


2. Use Add Product button on an Opportunity record and select the Product. Enter Quantity of 12 and Sales price of 12000.

3. Click Save.

4. On the Opportunity Product related list, click on the Product Name to view the Opportunity Product record and the Schedule entries.

January 30, 2020

Activity in Salesforce

OWD
1. Private(Read through related to records)
2. Controlled by Parent(Read/Write based on related to records)

Activities with no WhoId and WhatId are considered to be Private and only accessible to the Owner(Assigned To field).

Private checkbox on the Event records allows only the creator to view it and hides it from others.

Role Hierarchy grants access.

Users with View All or Modify All profile permissions can view/edit all activities.

OWD can be set for Calendars and users can share calendar to other users.
Sharing calendars won't give access to activities.

Activity can have only 100 fields(for both Task and Event). Limit is not separate for Event and Task.

Sandbox refresh won't include archived activities.

To know more about archived activities, check the below link

 https://www.infallibletechie.com/2015/06/archived-activities.html

January 29, 2020

Process Builder Debugging in Salesforce

1. Set Workflow to Finer in the Trace Flag in the Debug Log.


2. Look for Flow Elements(Flow_Element) in the Debug Log.

3. Version Id in the Error Message is the Id of the Flow(Process Builder).

4. Process Builder developer receives the detail email.

5. Search the Process Builder name and get the interview Id towards it left. Use this to debug more in the debug log.

January 28, 2020

January 7, 2020

INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST Lead Conversion Salesforce

1. Check whether the pick list field dependency is set.

2. If the object have record types, make sure the record type have the selected pick list value from Lead to Opportunity or Account if the Lead Mapping is set.

3. Check the Record Type selection during lead conversion.


January 6, 2020

Lightning Sync Status and Use in Salesforce

You can check for 60 minutes and 24 hours usage under Lightning Sync Status.


Create a custom report type with LightningSyncError for Error Report.


January 2, 2020

fieldsToNull in Salesforce API Call

Array of one or more field names whose value you want to explicitly set to null.
When used with update() or upsert(), you can specify only those fields that you can update and that have the nillable property. When used with create(), you can specify only those fields that you can create and that have the nillable or the default on create property.

For example, if specifying an ID field or required field results in a runtime error, you can specify that field name in fieldsToNull. Similarly, if a picklist field has a default value and you want to set the value to null instead, specify the field in fieldsToNull.

To reset a field value to null, you add the field name to the fieldsToNull array in the sObject. You cannot set required fields (nillable is false) to null.

Sample Code:

  1. sObject objContact = new sObject();  
  2. objContact.type = "Contact";  
  3. // Set the value of LastName to null  
  4. errorContact.fieldsToNull = new String[] { "LastName" };