• Salesforce P1
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 10
    Replies
I have a requirement where a Button on the List view need to behave differenly for different List views on the same object. I am looking at an option of passing the list view name as an input parameter to the flow that gets invoked by the button. Here the challenge is how to pass the List view Name as a parameter to the Flow on button click.


 
Hi,

We have created a Big Object with the Index configured with 2 fields. We have a SOQL in Apex , having filter criteria on both the index fields. However, still we are encountering the error 'Filters may not have any gaps within the composite key'. Any one who came across this behaviour and has any work around, please share your thoughts.User-added image

Hi,

We have configured a Big Object in our org. Through Future method and database.insertImmediate(pb); , we are trying to insert the entries into the object. There are no errors / exceptions that are observed and the logs indicate a successful insert.
User-added image


However, when we try to query the Object. it returns 0 records. We have verfied the Permission sets and all other Access. Any pointers are highly appreciated.
Came accross this limitation while trying to post a update on the chatter for a team of >25 members. Any workaround is highly helpful.
Hi All,

We have a future method that is called on the upload of files on a custom object. The objective of this method is to insert a record into 'ContentDistribution' object for every file. However, this method is erroring out with 'INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []' when triggered by a guest user action on the site.
We believe future methods are executed in the system context. In that case, this error doest make sense.  Is there anything we can adopt we pass through this error.
Guest users upload files on a custom object without sharing mode.Authenticated users are allowed to download the files thru a custom LWC component which exposes the clickable link 'URL='/sfc/servlet.shepherd/document/download/'+docLink.ContentDocumentId'. This functionality worked absolutely fine in our Lower instances. 
However, when we went live, the users started receiving an error and a error file 'errorduringprocessing.jsp' is getting downloaded instead of the actual file.
Any help or leads is highly appreciated.
Hi

We have a VF Page with an IFRAME within it. IFRAME is implementing apex:input file to upload attachments. 
Intermittently, the 'Choose File' stops responding. This is leading the user to close the browser and re launch, which then starts working.
Any inputs to resolve this issue !!  
Hi,

Salesforce sObject Tree API supports Reference Id to tag each individual record instance in the Request. Same Reference Id is used in response as well, which will make the external system easy to identify the response against each record instance in the Request. However the same is not supported in the UPSERT operation over sObject collection. Is there a way to identify the response against each record instance in request apart from salesforce Id in the response.

Thanks
 
I need to make the selectd option readonly once the user selected it. Here is my Code.
 <apex:outputLabel value="Products"/>
   <apex:selectCheckboxes value="{!selProds}" layout="pageDirection" id="selprod" styleClass="selprod">
   <apex:selectOptions value="{!AProducts}"></apex:selectOptions> 
       </apex:selectCheckboxes>

Any help is really appreciated.
Can we query using a collection variable in conditions to fetch records in Flow.
Eg: i have a collection of Accounts. Now i need to fetch latest case on each of these accounts . Kind of IN:= accountids scenario in SOQL
Hi Team,
I have a requirement like this...
Have 2 lists say Products and Locations which are dynamic and change from time to time in realtime.
Then in visualforce i need to display a matrix like this:
 
 L1L 2
Pr1True(Checkbox)False(Checkbox)
Pr2True(Checkbox)True(Checkbox)
And user should be able to select/unselect the checkbox.
 
I have a requirement where a Button on the List view need to behave differenly for different List views on the same object. I am looking at an option of passing the list view name as an input parameter to the flow that gets invoked by the button. Here the challenge is how to pass the List view Name as a parameter to the Flow on button click.


 
Hi,

We have created a Big Object with the Index configured with 2 fields. We have a SOQL in Apex , having filter criteria on both the index fields. However, still we are encountering the error 'Filters may not have any gaps within the composite key'. Any one who came across this behaviour and has any work around, please share your thoughts.User-added image

Hi,

We have configured a Big Object in our org. Through Future method and database.insertImmediate(pb); , we are trying to insert the entries into the object. There are no errors / exceptions that are observed and the logs indicate a successful insert.
User-added image


However, when we try to query the Object. it returns 0 records. We have verfied the Permission sets and all other Access. Any pointers are highly appreciated.
Hi All,

We have a future method that is called on the upload of files on a custom object. The objective of this method is to insert a record into 'ContentDistribution' object for every file. However, this method is erroring out with 'INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []' when triggered by a guest user action on the site.
We believe future methods are executed in the system context. In that case, this error doest make sense.  Is there anything we can adopt we pass through this error.
Guest users upload files on a custom object without sharing mode.Authenticated users are allowed to download the files thru a custom LWC component which exposes the clickable link 'URL='/sfc/servlet.shepherd/document/download/'+docLink.ContentDocumentId'. This functionality worked absolutely fine in our Lower instances. 
However, when we went live, the users started receiving an error and a error file 'errorduringprocessing.jsp' is getting downloaded instead of the actual file.
Any help or leads is highly appreciated.
I've taken the "Remove Relationship" button out of the page layout that we use for Account Contact Relationships. Unfortunately, this button is still available in the "Related Accounts" and "Related Contacts" list views in Salesforce Lightning.

Is there any way to hide this button on those list views, or prevent them from using it?
Lightning Components Basics
Connect Components with Events

I'm facing with the below issue.

The campingList component appears to be using UI Components instead of Base Lightning Components in the form. You should be using only Base Lightning Components in CampingList : Connect Components with Events

Below is my CampingList Component Codes.

campingList.cmp
-------------------------


<aura:component controller="CampingListController" >
    
    <aura:attribute name="items" type="Camping_Item__c[]"/>
    
    <aura:handler name="init" action="{!c.doInit}" value="{!this}" />  
    <aura:handler name="addItem" event="c:addItemEvent" action="{!c.handleAddItem}"/>   
    
    
    <!-- Page Header -->
    <div class="slds-page-header" role="banner" >
        <div class="slds-grid">
            <div class="slds-col" >
                <h1 class="slds-text-heading--medium">Camping List</h1>
            </div>
        </div>
    </div>  
    <!--/ Page Header -->
    
    <!-- New Camping Form -->
        <c:campingListForm />
    <!--/ New Camping Form -->
    
    <!-- Camping List Items -->      
    <aura:iteration items="{!v.items}" var="itm">
          <c:campingListItem item="{!itm}"/><br/>
    </aura:iteration>
    <!--/ Camping List Items -->   
    
</aura:component>

CampingListController.js
-------------------------------------


({
        
    //-- Load Camping list Items.
    doInit: function(component,event,helper)    
    {
        //-- Create the Action.
        var action = component.get("c.getItems");
        
        //-- Add callback behavior for when response is received.
        action.setCallback(this,function(response)
        {
            var state = response.getState();
            if(component.isValid() && state === "SUCCESS")
            {
                component.set("v.items",response.getReturnValue());
                console.log("doInit: "+response.getReturnValue());
            }
        });
        
        //-- Send action off to be execute.
        $A.enqueueAction(action);
    },
    
     //-- Handle Create Expense Actions..
    handleAddItem: function(component, event, helper)
    {
        console.log("\nEntry into CampingListController.js -> handleAddItem()");        
        
        var item = event.getParam("item");
        console.log("\nCampingListController.js -> handleAddItem() item: "+ JSON.stringify(item));
        
        var action = component.get("c.saveItem");
        action.setParams
         ({
            "item": item
         });
        
        action.setCallback(this, function(response)
        {
            var state = response.getState();
            if (component.isValid() && state === "SUCCESS")
            {       
               var items = component.get("v.items");
               console.log("Campaigns(items..) before  create: "+JSON.stringify(items));
               items.push(response.getReturnValue());
               console.log("Campaigns(items..) after  create: "+JSON.stringify(items));
               component.set("v.items",items);
            }
        });
        $A.enqueueAction(action);
    }

 
    
})

campingListForm.cmp
---------------------------------


<aura:component controller="CampingListController" >
    
    <aura:attribute name="newItem"  type="Camping_Item__c" default="{ 'sobjectType': 'Camping_Item__c',
                                                                      'Name':'',
                                                                      'Quantity__c': 0,
                                                                      'Price__c': 0,
                                                                      'Packed__c': false}"  />  
    
    <aura:registerEvent name="addItem" type="c:addItemEvent"/>
    
    
    <!-- New Camping Form-->  
    <div class="slds-col slds-col--padded slds-p-top--large" >  
           <!-- Boxed Area-->
        <fieldset class="slds-box slds-theme--default slds-container--small">
            
            <legend id="newexpenseform" class="slds-text-heading--small" >
                Add Camping List
            </legend>
            
            <!-- Create New Expense Form -->
            <form class="slds-form--stacked">
                <!-- Name -->
                <div class="slds-form-element slds-is-required" >
                    <div class="slds-form-element__control" >
                        <ui:inputText aura:id="name"  label="Camping Name" class="slds-input"
                                      labelClass="slds-form-element__label" value="{!v.newItem.Name}" required="true" />
                    </div>
                </div>
                
                
                <!-- Quantity -->
                <div class="slds-form-element__label" >
                    <div class="slds-form-element__control" >
                        <ui:inputText aura:id="quantity" label="Quantity" class="slds-input"
                                      labelClass="slds-form-element__label" value="{!v.newItem.Quantity__c}" />
                    
                    </div>                
                </div>
                
                <!-- Price -->
                <div class="slds-form-element slds-is-required" >
                    <div class="slds-form-element__control" >
                        <ui:inputNumber aura:id="price" label="Price" class="slds-input"
                                        labelClass="slds-form-element__label" value="{!v.newItem.Price__c}" required="true" />
                    
                    </div>
                </div>
                
                <!-- Packed -->
                <div class="slds-form-element" >
                    <ui:inputCheckbox aura:id="packed" label="Packed" class="slds-checkbox"
                                      labelClass="slds-form-element__label" value="{!v.newItem.Packed__c}" />
                </div>
                
                <!-- Button Create Expense -->
                <div class="slds-form-element">
                    <ui:button label="Create Campaign" class="slds-button slds-button--brand" press="{!c.clickCreateItem}"  />
                </div>
                
            </form>            
            <!--/ Create New Expense Form -->
        </fieldset>
          <!--/ Boxed Area-->        
    </div>
    <!--/ New Camping Form-->  
    
</aura:component>

campingListFormController.js
------------------------------------------


({
    clickCreateItem : function(component, event, helper)
    {
        //-- Simplistic error checking.
        console.log("\nIn CampingListFormController.js -> submitForm()");
        var validCampign = true;
        
        //-- Name must not be blank.
        var nameField     = component.find("name");
        var campaignname = nameField.get("v.value");
        if($A.util.isEmpty(campaignname))
        {
             validCampign = false;
            nameField.set("v.errors",[{message: "Camping name can't be blank."}]);     
        }
        else
        {
            nameField.set("v.errors",null);
        }

        //-- Quantity must not be blank.
        var qtyField = component.find("quantity");
        var quantity = qtyField.get("v.value");
        if($A.util.isEmpty(quantity))
        {
            validCampign = false;
            qtyField.set("v.errors",[{message: "Quantity can't be blank."}]);
        }
        else
        {
            qtyField.set("v.errors",null);            
        }
        
        //-- Price must not be blank
        var priceField = component.find("price");
        var price       = priceField.get("v.value");
        if($A.util.isEmpty(price))
        {
            validCampign = false;
            priceField.set("v.errors",[{message: "Price can't be blank."}]);
        }
        else
        {
            priceField.set("v.errors",null);            
        }
        
        //-- If we pass error checking, do some real work.
        if(validCampign)
        {
            //-- Create the new expense.
            var newCampaign = component.get("v.newItem");
            console.log("In CampingListFormController.js -> submitForm()\n The Item: " + JSON.stringify(newCampaign));
            helper.createItem(component, newCampaign);
        }               
         
        
        
    }
    
})

campingListFormHelper.js
--------------------------------------


({
    createItem : function(component,item)
    {    
        console.log("\nEntry into CampingListFormHelper.js -> createItem()");
        console.log("In CampingListFormHelper.js -> createItem() the item is: "+JSON.stringify(item));
        var createEvent = component.getEvent("addItem");        
        createEvent.setParams({ "item": item });
        createEvent.fire();        
        component.set("v.newItem",{'sobjectType':'Camping_Item__c','Name': '','Quantity__c': 0,'Price__c': 0,'Packed__c': false});
    }
})

CampingListController.apxc
----------------------------------------


public with sharing class CampingListController
{
    @AuraEnabled
    public static List<Camping_Item__c> getItems()
    {
        String[] fieldsToCheck = new String[]{'Id','Name','Packed__c','Price__c','Quantity__c'};
        Map<String,Schema.SObjectField> fieldDescribeTokens = Schema.SObjectType.Camping_Item__c.fields.getMap();
        
        for(String field : fieldsToCheck)
        {
            if(!fieldDescribeTokens.get(field).getDescribe().isAccessible())
            {
                throw new System.NoAccessException();
                return null;
            }            
        }        
        return [SELECT Id,Name,Packed__c,Price__c,Quantity__c FROM Camping_Item__c];
    }
    
    
    @AuraEnabled  
    public static Camping_Item__c saveItem(Camping_Item__c item)
    {    
        System.debug('Campaign List Item from Apex: '+item);
        upsert item;
        System.debug('Campaign List Item from Apex Id: '+item.Id);
        return item;
    }
        
}

addItemEvent.evt
-------------------------


<aura:event type="COMPONENT">
    <aura:attribute name="item" type="Camping_Item__c"/>
</aura:event>

Please suggest me where im missing.

Thanks.
Ravichand.






 
I have a custom object.  It has fields for region, status and created date and there are 5 records created every day.  I want a VF page that displays this as a matrix.  

Along the top I want days, and on the side region.  The cell should display the status field.

Example:

                     apr 24   apr 25     apr 26    apr 27    apr 28
UK                Yes       No          Yes       No         Yes
US                Yes       No          Yes       No         Yes
Europe          Yes       No          Yes       No         Yes

Is there an easy way to create this kind of a matrix in VF? 
  • April 24, 2015
  • Like
  • 0

Hi,

 

How to get a matrix table (like a matrix report with two grouping columns) in a visualforce page ? The matrix table should be like follwing image (colors is just for information):

 

Contractors/PLs

PL 1

PL 2

PL 3

PL 4

Contractor 1

Stage 1

Stage 1

Stage 1

 

Contractor 2

 

Stage 2

Stage 3

Stage 5

Contractor 3

 

 

Stage 4

 

Contractor 4

    

 

First line (Blue) --> get values for custom field PL__c (this is the first dimension

First column (green) --> get values for custom field Contractor__c (the the second dimension)

Content of the other cells (Orange) --> Stage__c

 

Except the top cell which will be the header (Red).

 

All the best,

 

Anzar,