• Sreenivasulu Adipudi
  • NEWBIE
  • 140 Points
  • Member since 2016
  • Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 21
    Questions
  • 14
    Replies
Hi everyone,

I have a requirement to perform bulk updates on the AccountTeamMember object. Need to change the value on UserId field. But, UserId is not editable on  AccountTeamMember. I decided to delete the existing AccountTeamMember records and create new ones. When I try to delete it, the following error occurred.
"insufficient access rights on object id".
Is there any workaround for this requirement?

Thanks in advance!
Sreenivasulu A

 
Hi,

I have the following requirement:
Case records OWD is set to Private. We need to provide/share the case access created by the user. Is there any standard approach for this requirement?

Thanks in advance!

Sreenivasulu A.
Hi everyone,

I have the following requirement.
Criteria 1: When the case is created time is <= 12 PM then update the duedate__c field as today(). If not,  update the duedate__c field to the next working day.
Criteria 2: When the case is created on the Weekends update the duedate__c to Monday.

Thanks in advance for your help!

Sreenivasulu A
Hi Everyone,

I have created a custom Aura component to display the list of values with a picklist. Loosing the selected picklist after refreshing the view by firing "force:refreshView" event. How/where can I hold the selected picklist value to retain the same after reresh.

Please help me by providing the solution.
Thanks in advance!

Sreenivasulu A.
Hi everyone,

I have the following requirement.
A custom button is present on the aura component. When the user clicks on the button, I need to display another component as a popup (like standard new functionality).
How can I achieve this?

Thanks in advance!
Sreenivasulu A.
Hi Everyone,

We have a custom URL button on the Task object.

Button URL : /_ui/core/email/author/EmailAuthor?p2_lkid={!ContactId}&rtype=003&p3_lkid={!CaseId}&retURL={!CaseId}&p24={!Account.Additional_Contacts__c}

'Account.Additional_Contacts__c' is custom field in Account object. It contains more than one email Id separating with a semicolon (;)
This button was created in Salesforce classic version. It is not working in lightning experience.

How to create a button with the same functionality in the lightning experience?

Please help in this scenario.

Thanks,
Sreenivasulu A.
Hi Everyone,

I have a requirement to add Chatter on the Case record page (lightning experience). Under chatter Post, Poll and Question are added. Now I need to add the 'Email' feature under the chatter group. I don't have an idea how to add Email under chatter.
Can anyone please help me regarding this scenario?

Thanks,
Sreenivasulu A.
Hi Everyone,

We have a custom field named 'Status' in the Contact object. 'Status' is a picklist value with two values Active/Inactive. 
My requirement is to display only Active contacts under the 'Opportunity Contact Role' related list. 
I have created the following lookup filter on the Contract role object:
Contact: Status equals to true.
But it is all contacts including Inactive as well. The lookup filter is not working.
Please help me by providing a solution to this.

Thanks,
Sreenivasulu A.
Hi Everyone,

I have a requirement to create a report as follows:
Display logged in user's Case records with Approval history data.
I created a report using the 'Process Instance' object. But the issue is it is displaying all Cases information irrespective of the logged-in user. Is there a way to display only 'Logged in user Cases with Approval history'.

Thanks in advance.
Sreenivasulu A.
Hi Everyone,

Unable to configure the Kanban view for Service Contract standard object. Also, Path settings configuration is not available for Service Contract standard object. 

Is there any way to configure the Kanban view and Path setting on the Service Contract object.

Thanks in advance.

Sreenivasulu A
Hi Everyone,

I configured the lightning record page with highlights panel for Product object.
The requirement is, Hide the fields from the detail section which are available in the highlights panel, to avoid the duplication of fields.
Because the fields in the highlights panel also available in detail section(page layout). 
Issue: If I hide the fields from page layout then good for record view, but those fields are not available while creating or editing the Product record.
Is there a standard functionality to add compact layout fields to create or edit the record?
(or) Do I need to create a custom lightning component?
Please review and provide your valuable recommendations.

Thanks,
Sreenivasulu A.
Hi Everyone,

I have the following scenario:
Update the Status__c field when Is_Active__c field value is changed.
  • As of now, we are using an apex trigger to update the field by comparing trigger.old and trigger.new values.
  • If wanted to use the visual flow, I have to get the old value from database and compare it with the new value.
  • It may cause another SOQL query.
My question in this scenario is,
Which is the best approach either using apex trigger or visual flows.

Thanks in advance.
Sreenivasulu A
Hi everyone,

We are having 100 profiles in our org. We are in the process of org clean up process and wanted to minimize the number of profiles. It is difficult to get data manually and a time-consuming process.
Is there any way to Query or extract All profile - level permissions?

Thanks in advance.
 
Hello everyone,

I have the following request.
A salesforce case needs to create from Share point.
We are using web-to-case right now.
How can I handle the case creation from Share point system?
Can anyone please help me with this request.

Thanks in advance.
 
Hi everyone,

We have S-Control's in our org. Some are currently in use and few installed from managed packages.
We are planning to migrate to lightning experience.
I don't have much knowledge of S-Controls. Can anyone please suggest me how do I delete the S-Controls that are currently in use?

Thanks in advance.
Hi Everyone,

I created a Visualforce page with a Delete All button. On click of the button, it will call the controller method and the controller method executes a batch class that will delete all the records from the object. 
Everything working as expected but if we click browser refresh button or F5 key while the deletion is in-progress then the batch class is re-initiating. 
How to stop the browser refresh.

My code as follows :

Viusalforce page :
<apex:page standardController = "Account" extensions="DeleteRecordsExtn">
    <apex:commandbutton label="DeleteAll" action="{!doDelete}"/>
</apex:page>

Controller method :
public void doDelete() {
    DeleteRecordsBatch delBatch = new DeleteRecordsBatch();
    Database.executeBatch(delBatch);
}

Batch class :
public class DeleteRecordsBatch implements Database.Batchable<sobject>{

public Database.QueryLocator start(Database.BatchableContext BC){
    return Database.getQueryLocator('SELECT Id FROM Account');
}
public void execute(Database.BatchableContext BC, List<SObject> lstRecords){
    Database.delete(lstRecords, false);
}
public void finish(Database.BatchableContext BC){
}

Can anyone please help me in this scenario.
Hi Everyone,

I need to change the object-level permissions on the user profile. When clicking on the Edit button (which present left side of profile name) the view is looking as similar to Permission set view. I am not sure why it is looking like that.
Can anyone please help me with this reg.

Thanks in advance.
 
Hi everyone,

I created a stack graph with a visualforce page and some javascript.
I am not familiar with Javascript. I am getting the following error.
"Unknown property 'AccountStandardController.data'".

Visualforce Page:
<apex:page standardController="Account" extensions="DashboardExtn ">
<script>
    // Build the chart data array in JavaScript
    var data = new Array();
</script>

<apex:repeat value="{!data}" var="monthList">
    <script type="text/javascript">
    var product = {};
    </script>
    <apex:repeat value="{!data[monthList]}" var="productList">
        {!monthList} {!productList} {!data[monthList][productList]}<br/>
        <script type="text/javascript">
            product['{!productList}'] = {!data[monthList][productList]};
            product['name'] = '{!monthList}';
        </script>
    </apex:repeat>
<script type="text/javascript">
data.push(product);
</script>
</apex:repeat>
    
    <apex:chart data="data" height="400" width="500">
    <apex:legend position="left"/>
    <apex:axis type="Numeric" position="left" title="title" grid="true" fields="yfield" dashSize="2">
        <apex:chartLabel />
    </apex:axis>
    <apex:axis type="Category" position="bottom" fields="name">
        <apex:chartLabel rotate="315"/>
    </apex:axis>
    <apex:barSeries orientation="vertical" axis="left" stacked="true" xField="name" yField="yfield" title="title"/>
</apex:chart>
</apex:page>

Controller :
public class DashboardExtn 
{
    public static ID accountID;
    public static Map<String, Map<String,Decimal>> data;
    
    public DashboardExtn(ApexPages.StandardController controller)
    {
        accountID = controller.getId();
    }

    public static Map<String, Map<String,Decimal>> getChartData() 
    {
        data = new Map<String, Map<String,Integer>>();
        for (Account objAccount : [SELECT Id, Name, Status__c, Access_Percentage__c FROM Account WHERE Id =: accountID]) 
        {
            putData(objAccount.Name, objAccount.Access_Percentage__c, objAccount.Status__c);
        }
        return data;
    }
 
    private static void putData(String Name, Decimal accessPercentage, String status){
    Map<String,Decimal> statusGroup = new Map<String,Decimal>();
    if (data.containsKey(Name)){
        statusGroup = data.get(Name);
    }
    statusGroup.put(status, accessPercentage);
    data.put(Name, statusGroup);
}

Can anyone please help me in this query.
Hi Everyone,

I created a Batch apex to process bulk records. Once the batch process is completed then need to send an email alert. For that, I implemented the following logic on the finish method.
//Query the AsyncApexJob object to retrieve the current job's information.
AsyncApexJob apexJob = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email
FROM AsyncApexJob WHERE Id =: BC.getJobId()];
            
//Send an email to the Apex job's submitter notifying of job completion.
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] toAddress = new String[] {apexJob.CreatedBy.Email};
mail.setToAddresses(toAddress);
mail.setSubject('Apex Job status is ' + apexJob.Status);
mail.setPlainTextBody('The batch Apex job processed ' + apexJob.TotalJobItems + ' batches with '+ apexJob.NumberOfErrors + ' failures.');
Messaging.SingleEmailMessage[] messages = new List<Messaging.SingleEmailMessage> {mail};
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages);

But I didn't get the email alert.
I verified the debug logs, it displays the following message.

|results|"common.apex.runtime.impl.ScalarList@bac8ad2"|0x1ef0e446.
Can anyone please help me.
Thanks in advance.
 
I have to create a stacked bar chart dynamically in the Visualforce page. 
My requirement as follows:
1. Create a stacked bar graph.
2. Add the graph to the Object page layout.
3. Filter the graph by the selected dropdown value. 
4. Restrict the onClick event.
5. Display the details on hover over on the chart.

Is there any way to create a stacked bar graph in a visualforce page.
Thanks in advance.
Hi,

I have the following requirement:
Case records OWD is set to Private. We need to provide/share the case access created by the user. Is there any standard approach for this requirement?

Thanks in advance!

Sreenivasulu A.
Hi Everyone,

We have a custom URL button on the Task object.

Button URL : /_ui/core/email/author/EmailAuthor?p2_lkid={!ContactId}&rtype=003&p3_lkid={!CaseId}&retURL={!CaseId}&p24={!Account.Additional_Contacts__c}

'Account.Additional_Contacts__c' is custom field in Account object. It contains more than one email Id separating with a semicolon (;)
This button was created in Salesforce classic version. It is not working in lightning experience.

How to create a button with the same functionality in the lightning experience?

Please help in this scenario.

Thanks,
Sreenivasulu A.
Hi Everyone,

I have a requirement to add Chatter on the Case record page (lightning experience). Under chatter Post, Poll and Question are added. Now I need to add the 'Email' feature under the chatter group. I don't have an idea how to add Email under chatter.
Can anyone please help me regarding this scenario?

Thanks,
Sreenivasulu A.
Hi Everyone,

I have a requirement to create a report as follows:
Display logged in user's Case records with Approval history data.
I created a report using the 'Process Instance' object. But the issue is it is displaying all Cases information irrespective of the logged-in user. Is there a way to display only 'Logged in user Cases with Approval history'.

Thanks in advance.
Sreenivasulu A.
Hi Everyone,

I configured the lightning record page with highlights panel for Product object.
The requirement is, Hide the fields from the detail section which are available in the highlights panel, to avoid the duplication of fields.
Because the fields in the highlights panel also available in detail section(page layout). 
Issue: If I hide the fields from page layout then good for record view, but those fields are not available while creating or editing the Product record.
Is there a standard functionality to add compact layout fields to create or edit the record?
(or) Do I need to create a custom lightning component?
Please review and provide your valuable recommendations.

Thanks,
Sreenivasulu A.
Hi Everyone,

I have the following scenario:
Update the Status__c field when Is_Active__c field value is changed.
  • As of now, we are using an apex trigger to update the field by comparing trigger.old and trigger.new values.
  • If wanted to use the visual flow, I have to get the old value from database and compare it with the new value.
  • It may cause another SOQL query.
My question in this scenario is,
Which is the best approach either using apex trigger or visual flows.

Thanks in advance.
Sreenivasulu A
Hi everyone,

We have S-Control's in our org. Some are currently in use and few installed from managed packages.
We are planning to migrate to lightning experience.
I don't have much knowledge of S-Controls. Can anyone please suggest me how do I delete the S-Controls that are currently in use?

Thanks in advance.
Hi Everyone,

I created a Batch apex to process bulk records. Once the batch process is completed then need to send an email alert. For that, I implemented the following logic on the finish method.
//Query the AsyncApexJob object to retrieve the current job's information.
AsyncApexJob apexJob = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email
FROM AsyncApexJob WHERE Id =: BC.getJobId()];
            
//Send an email to the Apex job's submitter notifying of job completion.
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] toAddress = new String[] {apexJob.CreatedBy.Email};
mail.setToAddresses(toAddress);
mail.setSubject('Apex Job status is ' + apexJob.Status);
mail.setPlainTextBody('The batch Apex job processed ' + apexJob.TotalJobItems + ' batches with '+ apexJob.NumberOfErrors + ' failures.');
Messaging.SingleEmailMessage[] messages = new List<Messaging.SingleEmailMessage> {mail};
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages);

But I didn't get the email alert.
I verified the debug logs, it displays the following message.

|results|"common.apex.runtime.impl.ScalarList@bac8ad2"|0x1ef0e446.
Can anyone please help me.
Thanks in advance.
 
I am using <analytics:reportChart> in a visualforce page. I added this Visualforce page to Account Page layout. My requirement is I need to restrict the onClick event for the user, but the user can be able to see the details Onhover the mouse pointer. How can I restrict onclick and enable Onhover on <analytics:reportChart>.

Can anyone please provide a solution. Thanks in advance.
User-added image
It takes long time to save this simple apex page. So long that i lost patience and closed the browser.
I have tried a few times but saw the status changing to "Saved" .
When i forcibly close the console window all changes are lost.
Tried it on latest Firefox and Chrome browsers with same result.