• Sumeet_Force
  • SMARTIE
  • 595 Points
  • Member since 2014
  • Salesforce Specialist


  • Chatter
    Feed
  • 17
    Best Answers
  • 3
    Likes Received
  • 2
    Likes Given
  • 15
    Questions
  • 182
    Replies
Hi All,
           I am unable to trace out how the field was shown on the chatter feed tracking, eventhough we don't havethat  field on the opportunity. We don't have Net Revenue field on the opportunity but the chatter feed tracking shows field update value on opportunity record detail page whenever updating the record. Any one suggest me the reason why it is happen? How do we trace out the cause?
Hi Friends,

Please help on below Trigger. I am trying to insert Quote when the attachment is added to Opporunity and the file name contains PDF.

trigger oppattachment on Attachment (after insert, after update) {
    
    Set <Id> oppIds = new Set <Id>();    
    for(Attachment attach : Trigger.new) {
        if(attach.ParentId.getSobjectType() == Opportunity.SobjectType) {
            if(string.valueOf(attach.Name).contains('.pdf')) {
                oppIds.add(attach.ParentId);
            }
        }
    }
    List <Quote> quoteList = [SELECT id, name, opportunityid FROM Quote WHERE Id IN: oppIds];
    for(Attachment attach : Trigger.new) {
        if(quoteList !=null && quoteList.size()>0){
            for(quote q : quotelist){    
                q.name = attach.name;       
            }
            insert quoteList;
        }
    }                
}

Thanks.
I am having the developer console fail on me often enough (as described in Salesforce Help) that I got tired of using Workbench to fix it, and I wrote a Visualforce page that uses https://jsforce.github.io and the Tooling API to do the trick.

My source code is here: https://gist.github.com/bolaurent/65e3f59ac81ee2587a7d67a2d372996e

There's one issue that is bugging me. When you press the "Delete my IDEWorkspace" button, the delete operation works correctly, but the page refreshes, and it complains that it cannot find the user's IDEWorkspace (because it has been deleted).

Why is this refresh happening? How can I prevent it?

 
Hi Guys,

We have reuirement to get the picklist values in a custom field usinf APIs.

I have tried this

 /services/data/v41.0/tooling/query?q=Select+MetaData+From+FieldDefinition+where+EntityDefinition.DeveloperName='Lead'+AND+FieldDefinition.QualifiedApiName='customfield Name'

But this is giving me a massive response to parse.

Is there any other easier way to do this?

Thanks,
Yamini.
Every time I create an Account object, within a few days all the data associated with that Account's Membership fields gets erased. I added tracking of Activity History for Account objects, and I can see that the Membership data supposedly gets erased by one of my coworkers. However, this coworker is not actually entering Salesforce and editing any data. I think the problem is an Apex trigger that was created by said coworker. The only Apex trigger we have is indeed created by this coworker, but I don't know how to delete the trigger. The only option I seem to have is to uninstall the package associated with this Apex trigger. That package is the "Nonprofit Success Pack," which I am hesitant to uninstall because it seems like it might be an important package. Also, I am sure there must be an easier way to remove or edit the trigger without removing the package. Any suggestions? 

Thanks in advance!
"Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: STORAGE_LIMIT_EXCEEDED, storage limit exceeded: []"


Getting this error message when trying to check challenge. This is Automate Basic Business Processes with Process Builder module in Trailhead. I followed the steps suggested by people to check storage from system overview area. I checked that and found I have lots of storage available. Only 350 KB out of total possible of 5MB, which is only 6% of total availa storage. so 94% is free.

When I click on 350 KB and check storage usage, everything looks okay except File storage which is 112% used. Content bodies have used 99% of available storage.

Can somebody please advise what should I do. and if I have to reduce file storage how can i do that.

Thanks in advance.
Hi, I have no prior experience in coding so I'm wondering if it's possible to execute a Visual Flow after deleting a record from a trigger? If so how can I do this?
Hi All,

I need to write trigger on contact object.
My problem is whenever i change the account name from in existing contact record then all account name should be changed related to contact object record like case and task. Example Case record and Task record account name should be changed whenever i change account name on contact record.

Thanks,
Can I hide a Date field based on selection of picklist value in a different field.
Dear All,

I need some help in making a Rest Api Call Out.
When I execute the below code in Execute Anonymous Window, it works fine.

Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://XXXX-dev.XXXXXXX/PSSSSSb/zzzzz/EZApiDEGroupDEVMain/invoice/compsearch');
request.setMethod('POST');
request.setHeader('Content-Type', 'application/json;charset=UTF-8');
// Set the body as a JSON object
request.setBody('{ "company_reg": "06587726"}');

HttpResponse response = http.send(request);

if (response.getStatusCode() != 201) {
    System.debug('The status code returned was not expected: ' +
        response.getStatusCode() + ' ' + response.getStatus());
    System.debug('Response ' + response.getBody());
} else {
    System.debug(response.getBody());
}


But when the tried to put this in a Apex class, its not working. (status code == 500)

public with sharing class ProvenirCsCallout {
    
    @future (callout=true)
    public static void sendRequest(Id accid, String comp_reg){
        
        Http http = new Http();
        HttpRequest request = new HttpRequest();
            request.setEndpoint('https://xxxxxxxx/xxxx/xxxxxxEZApiDEGroupDEVMain/invoice/compsearch');
            request.setMethod('POST');
            request.setHeader('Content-Type', 'application/json;charset=UTF-8');
            //request.setHeader('Accept','application/json');
// Set the body as a JSON object
            JSONGenerator gen = JSON.createGenerator(true);   
                gen.writeStartObject();     
                gen.writeStringField('company_reg ', comp_reg);
                String jsonS = gen.getAsString();
            
                request.setBody(jsonS);
           // request.setBody('company_reg='+EncodingUtil.urlEncode(comp_reg, 'UTF-8'));

            HttpResponse response = http.send(request);
     
            if(response.getstatusCode() == 200 && response.getbody() != null){
               String strResponse = Response.getBody();
                } else {
}

What I am missing ???

Thanks,
Raghu
Apex / Visualforce
SubjectCannot see an active flow in the Set Up Flows section, need to deactivate that flow
DescriptionWe are getting an error while adding new contacts or editing the existing contacts.

The reason for this error is the flow with this ID – 301390000004YNI.
I cannot see this flow in the Flows section of Set Up

However, if I open the link for Flow Designer with this Flow ID - 301390000004YNI, I can see the entire Flow process.https://sitespect.my.salesforce.com/designer/designer.apexp#Id=301390000004YNl

This flow is currently active, so I’m not able to make any changes to this flow.
I just want to Deactivate this flow, which is only possible if I can see it in the flows section of Set Up.
Severity LevelLevel 2 - Urgent
Business ImpactWhat functionality are you unable to perform?
Create/update New/existing Contacts
How many users are impacted?
Sales and Customer success team
Are the impacted users internal/external?
Internal
Is there currently a workaround in place?
Yes
Is there a pending deployment / go live?
No
I have a kind of URL hack in a formula field that Im using to present a button on a page.  In this forumula, i'm calling a flow that will simply update a status, then return the user to the original record and update the field so that it no longer shows the button.  This is built out in the sandbox and was working perfectly up until last week and I have not made any changes to the fields so i have no idea whats happening.  As it is now, when the user clicks the button, the flow will complete successfully but i'm not being redirected back to the original record.  I just remain on the 'Your flow finished' page.  Below is the formula field, and it appears there are issues with the return URL portion of it.  Any assistance would be apprecaited.

Here's the formula (this is firing on a custom object 'Request')

F (ISPICKVAL ( Status__c , "Draft"), 
HYPERLINK("/flow/SubmitButtonUpdate?RequestID="&Id&"&retURL=%2F"&Id,IMAGE("/resource/SubmitImage", "Submit to GSE Team"),"_self"), null)

 
Hi!,
I'm trying to find a way to trigger an automatic action (changing stage) with process builder when a new Opportunity (customer) is created and this Opportunity contains an existing email address in my Salesforce. This way I can control when a customer is visiting again our website asking for a quotation (when a customer asks for a quotation on the website, the info is sent from our CMS to Salesforce to create a new Opportunity with a customer email address associated to it). How can I do this process or workflow rule? I don't know how to tell the system to check for an existing email address. Is there a standard place in my Salesforce where this info is stored and you can check it with a workflow rule? Thank you for in advance for your help!
 
How i can insert record from vf page without using controller?
Hi,

I want to updateto date field based on another object value.If my Case object having a picklist field value ABCD then in policy object i wnat to update two date fields.I will match Policy no from my case object so that it will update that exact policy start date and end date. Please help