• Prashant Singh 214
  • NEWBIE
  • -2 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
I created a trigger that outputs error if checkbox is true and no document is attached. 

It's working great. However, I've read here that I should bulkify it so that I don't hit SOQL query limits. 

I need help bulkifying the below code. Thank you :)
trigger ReportRequestTrigger on Report_Request__c (before update, after update) {
    for(Report_Request__c rr:Trigger.New) {
        if(rr.Will_Receive_Provider_Facility_Claims__c== TRUE) {
            LIST<ContentDocumentLink> attachments = [SELECT ContentDocumentId, LinkedEntityId  FROM ContentDocumentLink where LinkedEntityId = : rr.Id];
            if(attachments.size()<=0){
                rr.adderror('You cant select "Will Receive Provider Facility Claims" without attaching a Zip Census');
            }
        }
    }
}

 
  • February 18, 2021
  • Like
  • 0
Does anyone know if it is possible to set the Message ID or Thread ID when creating a custom log email button from the lightning outlook plugin? I have been able to set the Message Body, all the attributes from the People Object sucessfully but I would like to have the other attributes associated with the email message in Salesforce. 
What is the difference between Permission set licenses and Feature licenses?

Here is an explanation in Salesforce Documentation which I do not fully understand:
Permission Set Licenses
A permission set is a convenient way to assign users specific settings and permissions to use various tools and functions. Permission set licenses incrementally entitle users to access features that are not included in their user licenses. Users can be assigned any number of permission set licenses.

Feature Licenses Overview

A feature license entitles a user to access an additional feature that is not included with his or her user license, such as Marketing or Work.com. Users can be assigned any number of feature licenses.

I guess I should start by asking what is the difference between a "Permission" and a "Feature". I know what a Permission is (Example, a Profile is a set of Permissions). But, in contrast, what is a Feature in Salesforce?

Thank you.
  • September 04, 2018
  • Like
  • 1
Hello, there. I'm working on very first Lightning application, and I'm noticing some strange behavior. I'm using a VF page with <apex:includeLightning /> and a script to load a component from an app like so:
 
$Lightning.use("c:OpportunityProductApp", function() {
    $Lightning.createComponent("c:PricebookSelector", {}, "pricebookSelector", function(cmp) {
        console.log('loaded component ...');
	    // do some stuff here
    });
});
The Lightning application is very simple:
 
<aura:application access="GLOBAL" extends="ltng:outApp">
    <c:PricebookSelector />
</aura:application>
The lightning component is as equally simple:
<aura:component controller="PricebookSelectorController">
    <aura:attribute name="pricebooks" type="List" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
</aura:component>
The component controller looks like this:
({
    doInit : function(component, event, helper) {
        helper.getPricebooks(component);
    }
})
Finally, the component helper looks like this:
({
    getPricebooks: function(component) {
        var action = component.get("c.getPricebooks");

	    var self = this;
	    action.setCallback(this, function(actionResult) {
		    console.log(actionResult);
	    });

	    $A.enqueueAction(action);
    }
})
The problem:

When I load up the VF page, I get a debug to the console that the component has finished loading (as expected). However, I get two separate, but identical, log messages with the action result. Why are two calls made to the server??

Thanks so much. =)




 
Hi, 
can i get all the values of a picklist field in a list some how?

I have picklist type custom field in the product. having some options.
In my apex class i want to use these options. can I get them some how throught code?