• Marzorati Claudio
  • NEWBIE
  • 105 Points
  • Member since 2017
  • Senior Developer and Business Analyst
  • Sintegra s.r.l.


  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 28
    Replies
I am looking to write a class on the Task object to categorize emails coming in or going out of the system when they are forwarded into the system by Email-To-Salesforce BCC address but they are synced the same except:

Additional To: xxxx@xxxx.com
CC:
BCC:
Attachment:

should be categorized as an Outgoing Email

while 

Additional To: 
CC:
BCC:
Attachment:

should be categorize as an Incoming Email.

How should the I write the IF statement?

Thanks!
Hi,
I am displaying data in the lightning component using the data table and have been exposed to Sites via the VF page. Now the requirement is, all the records of the table should be clickable and open detail into a new tab in Site where more action can be placed onto the detail page.

 This works fine when I use this component in Salesforce Lightning App or preview from the developer console. it's clickable and opens in a new tab.

Whereas opening in new tab does not work when I expose this component to Site.    

Any Suggestion, below are the snippet code.

component.set('v.columns',[
            {label: 'Job ID', fieldName: 'linkName', type: 'url', sortable:true, typeAttributes: { label:{ fieldName: 'Name'}, target:'_blank'}}


if(state === "SUCCESS"){
                var storeResponse = response.getReturnValue();
                console.log('storeResponse.length is ',storeResponse.length);
                storeResponse.forEach(function(record){
                    record.linkName = '/'+record.Id;
                });
Hi gurus,

i really only need Inline editing for 1 permission set on a custom object i'm working on,is this only at the Org level?,
so if it's enabled everyone will see it and on all objects?

Carolyn
Hi all,

I have a site with a Guest Profile User that is not able to download doc without loggin into the org.
I read that Content Distribution are not available to Guest User, indeed I receive this error when trying to query Content Distribution (Content Version is available from '19 https://releasenotes.docs.salesforce.com/en-us/spring19/release-notes/rn_networks_guest_upload.htm)

When I'm trying to query the Content Distribution as Guest User I receive this
sObject type 'ContentDistribution' is not supported.
I have also enabled Content Delivery without password in my org
User-added image
but nothing changes.

Please let me know if it possibile for Guest User to download doc wihout logging into the org or I must save doc to another system in order to encompass my request.

Thank you


 
Hi All,

As per the recent Salesforce's "Guest User Security Policy", Salesforce recommends to enable the 'Secure Guest User Record Access', 'Assign Records Created by Guest Users to a Default Owner', 'Secure Guest Users' Org-Wide Defaults and Sharing Model', 'Remove View All Users Permission from Guest User Profiles' 

We have few Guest User profiles in our Org, to which we provide the Edit/Modify All/View All accesses. As per the Salesforce Spring20/Summer20 Release notes, the Guest Users are not allowed to have the edit access anymore, they no longer going to be the default owner of the records they create, they no longer will be assigned to a Public Group and no longer have Object Permissions.

In this case, as its going to affect certain functionalities in our Org, we identified an alternate solution to provide access to the Guest Users, which is to declare our related 'Apex Classes' as 'Without Sharing' to run those classes in system mode.

My question here is, is this a best practice that can be opted as an alternate to provide edit access to our Guest Users? Or is there any other option for us to continue to provide the Guest Users the update access?
 
I am looking to write a class on the Task object to categorize emails coming in or going out of the system when they are forwarded into the system by Email-To-Salesforce BCC address but they are synced the same except:

Additional To: xxxx@xxxx.com
CC:
BCC:
Attachment:

should be categorized as an Outgoing Email

while 

Additional To: 
CC:
BCC:
Attachment:

should be categorize as an Incoming Email.

How should the I write the IF statement?

Thanks!
Select id, owner.createdbyid, Name from Lead
Error :No such column 'createdbyid' on entity 'Name'. 

 
Hi,

Just started learning salesforce stuck in 1 problem ..pls help!

i have a field having value ex
salary=2020.0000

trying to remove last 2 zero only..not able to achieve
want result like: 2020.00

want to use only "FORMULA FIELD"

tried through round() but its not working

 

I have a community group but I want to add a custom drop down on my group component UI.

Is this possible?
 

I need some help writing a test class. I keep encountering errors with my existing class and would appreciate a fresh view. 

I basically need this re-written:

@isTest
private class ActiveAccountTest{
    static testmethod void validateActiveAccount()
    {
        // Create your test data
        Account acc = new Account();
        acc.name= 'test';
        insert acc;     
        
        Opportunity oppObj = new Opportunity(Name = 'TestOpp',AccountID = acc.Id,Amount = 2000,CloseDate=Date.today(),StageName='A - Purchase / Close Won', MarketingGeneratedType__c = 'Sales');
		insert oppObj;

		Product2 newProd = new Product2 (Name = 'Product 1', ProductLine__c ='Custom Products');
		insert newProd;

		PriceBookEntry pbEntry = new PriceBookEntry(
    	UnitPrice = 1,
    	PriceBook2Id = [SELECT Product2.Id, Product2.Name FROM PriceBookEntry WHERE Pricebook2Id IN (SELECT Id FROM PriceBook2 WHERE Name = 'Custom Products') LIMIT 1].Id,
    	Product2Id = newProd.Id,
   		IsActive = true);

		insert pbEntry ;

		OpportunityLineItem oppLine = new OpportunityLineItem(pricebookentryid=pbEntry.Id,TotalPrice=2000,Quantity = 1,OpportunityID = oppObj.Id);
		insert oppLine;
        
        Test.startTest();
            Account acct4 = [Select Custom_Checkbox_1 from Account limit 1];
        Test.stopTest();
         }
}

The issue here is that I need to reference a custom Pricebook ID. This code fails my code coverage tests and has this error:

System.QueryException: List has no rows for assignment to SObject

Are there any stats breaking down what desktop screen resolutions users are viewing Salesforce Lightning and how many for each? Would be interested to see the breakdown so we can design/dev accordingly for the most used resolutions but still be responsive.
I am attempting to save the following but keep getting the error:

Error: Compile Error: Variable does not exist: Send_Attachment_Notification_Email__c at line 20 column 17

The API name for the field on the opportuity object is Send_Attachment_Notification_Email__c so I am not sure what I could be doing wrong.
 
trigger attachmentTrigger on Attachment (before insert) {
    // 1. Get List of Object Ids you wish to notify on
    Set<Id> objectIds = new Set<Id>();
    
    // 2. Loop through list of attachments, and if attachment is associated to object you want to notify on, add Parent Id to objectIds set
    for(Attachment a:trigger.new){
        String keyPrefix = string.valueOf(a.ParentId).substring(0, 3);
         
         if(keyPrefix == '500'){
            objectIds.add(a.ParentId);
         }
    }
    
    // 3. Get your objects you want to notify on, and set the Send Attachment Notification Email field to True 
        // This will to fire the workflow rule to send the email
    if(objectIds.size() > 0){
        List<CASE> yourObjectList = [SELECT Id FROM CASE WHERE Id IN :objectIds];
        
        for(CASE obj:yourObjectList){
            obj.Send_Attachment_Notification_Email__c = TRUE;
        }
        
        if(yourObjectList.size() > 0){
            update yourObjectList;
        }       
    }
}

 
Hi,
I am displaying data in the lightning component using the data table and have been exposed to Sites via the VF page. Now the requirement is, all the records of the table should be clickable and open detail into a new tab in Site where more action can be placed onto the detail page.

 This works fine when I use this component in Salesforce Lightning App or preview from the developer console. it's clickable and opens in a new tab.

Whereas opening in new tab does not work when I expose this component to Site.    

Any Suggestion, below are the snippet code.

component.set('v.columns',[
            {label: 'Job ID', fieldName: 'linkName', type: 'url', sortable:true, typeAttributes: { label:{ fieldName: 'Name'}, target:'_blank'}}


if(state === "SUCCESS"){
                var storeResponse = response.getReturnValue();
                console.log('storeResponse.length is ',storeResponse.length);
                storeResponse.forEach(function(record){
                    record.linkName = '/'+record.Id;
                });
I am using HTTP POST for submittig data to an external application.
With Postman the request gives Resonse as expected with HTTP response code of 200.
But while doing the same with apex class and HTTP Request/Response the response is Bad Request, StatusCode=400.
I have tried with different content-type but the error persists.Can anybody help me out ?