• Ankit Solanki 6
  • NEWBIE
  • 34 Points
  • Member since 2019
  • 2X Salesforce Certified Developer
  • Freelancer


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 20
    Replies

I'm trying to show an image that covers the whole page of a visualforce page.

Tis like a whole page watermark.

I have only achieved to sow an image that respects some borders, not the whole page

<apex:page standardController="Opportunity" renderAs="advanced_pdf" applyBodyTag="false" standardStylesheets="false"  showHeader="false"  applyHtmlTag="false">
	<head>
        <style  type="text/css">
           
            
            .mark {
               	background: url({!$Resource.MarcaFL}) no-repeat;
               border: 2px solid black
           		font-family: "Arial Unicode MS", Tahoma,sans-serif;
            	font-size: 9pt;
            	width=50%;
            	height=50%;
            	position:relative;
            	background-size:contain;
            }
			div{
            	
           		font-family: "Arial Unicode MS", Tahoma,sans-serif;
            	font-size: 9pt;
            	width=100%;
            	position:relative;
            	text-align:left;
            }
            .right{
            	float:right;
            	
            	width: 50%;
            	border=1;
            }
            .left{
            	float:left;
            	
            	width: 50%;
            }
            .Left3{
            	
            }
            .Mid{
            
            
            }
            .Right3{
            
            }
            p{
            	font-size:20px;
            	color:#365f91;
            }
             .Equipo{
            	font-family: "Arial Unicode MS",Tahoma,sans-serif;
            	color:rgb(196,89,17);
            	font-size: 9pt;
            }
            .tabla{
            	font-family: "Arial Unicode MS",Tahoma,sans-serif;
            	font-size: 9pt;
            	color:rgb(0,0,0);
            }
            span{color:rgb(31,77,120);}
            b{font-weight:bold;}
            strong { font-weight: bold; }
           
            .T {font: bold 20px; color:black; }
        </style>
    </head>
	<body padding="20">
        <div >
           
            <img src="{!$Resource.MarcaFL}" style="position:absolute; width:100%; height:75%; opacity:.2;"/>
       	<div>
            <center>
        	<h1 style=" font: bold 2.5em 'Gotham Book', Arial, sans-serif;">
                
            
                                            Some stuff...
                 
                </h1>
        </center>
            </div>
</body>
</apex: page>
I had a public group which is now showing as archived whenever I try to share a file with it. I have searched for a solution but there is no option for arcive checkbox in in the public group setting. I see it in the page layout setting but it is still not available. My concern is that if I create a new group it should not get archived down the line.
Navigate to another LWC component in the sites page
I have tried below but it's not working

import { LightningElement,track,wire} from 'lwc';
import { NavigationMixin } from 'lightning/navigation'; 
export default class Request_GeneralInfo_lwc  extends NavigationMixin(LightningElement) {



// button click 
ContinueReview(event){
this[NavigationMixin.Navigate]({
            type: 'comm__namedPage',
            attributes: {
                pageName: 'c__request_Review_LWC'
            },
            state: {
                'category': 'param1value'
               }
        });
}

In this scenario, I have to navigate request_Review_LWC lwc component in the sites page
Hi there!

Just starting to learn and trying to figure out how to update a pick list field using a trigger, based on a related list.
If an Account does not have a record in the related list whose date field is within the past year, I want to set the pick list field to 'Inactive'.

1. If you have advice towards when to trigger this, please let me know your thoughts.
2. I am trying to sort the SOQL list and then set the pick list field based on the last date in the list, but can't seem to get it. Do you know of a better way to go about this or how to make this work? Thank You in advance!
trigger IsActive on Account (before update, before insert) { 

    if(Trigger.isAfter || Trigger.isUpdate){

        List<Integer> dates1 = new list<Integer>();{
        for(Account ac : [SELECT Id,Name,(SELECT Event_End_Date__c FROM Experiences_Associated_With_Delivery__r Order By Event_End_Date__c desc) FROM Account Where id IN :Trigger.new]){

            if(dates1.get(dates1.size()-1) > 1) {
            Account.Activity_Status__c = Inactive; 
            } else { Account.Activity_Status_c = Active;
          }
        }
    }
}
}

 
I'm using the NPSP data import advanced mapping to load an Account and a child custom object. Issue is, I am getting duplicates of the custom object. NPSP data import has a way to specify matching rules for Accounts, Contacts, Opportunities, and Payments, but nothing for my custom object.

There is a public virtual class BDI_ObjectMappingLogic that would let me add custom matching, but of course it's public so I get the
Compile Error: Type is not visible: npsp.BDI_ObjectMappingLogic
Anyone have any experience with matching rules for custom objects in NPSP data import advanced mapping? Or with using unmanaged apex to override a public virtual managed package class? Or, with installing open-source NPSP outside of the managed package?



 
I am unable to establish a connection been my service console and communities chat function.  The community name is
'seller', 'agency', or 'buyer' but for some reason Salesforce is appending
a 2 at the end of the naming convention so the endpoint now is 'seller2'.  This as reason connection failure.
 
Hi there,
I've followed this guide ( https://admin.salesforce.com/blog/2019/use-flow-builder-to-create-a-roll-up-summary-field) to create a roll-up summary field on the Account object to count the number of Projects linked to an Account record via an Account lookup relationship field.
I have further added the filters Project Record Type = Delivery and Active = True, since I only want to count the number of Active Delivery Projects linked to an Account.
The issue I am facing is that the flow does not deduct 1 from its count when I uncheck the Active checkbox (i.e., when Active = False).
Can any one please suggest a work around that can be applied to count the number of Projects, while considering the record type and Boolean value for the Active field?
Thanks heaps!
(PS: I am not a developer)
 

I'm trying to show an image that covers the whole page of a visualforce page.

Tis like a whole page watermark.

I have only achieved to sow an image that respects some borders, not the whole page

<apex:page standardController="Opportunity" renderAs="advanced_pdf" applyBodyTag="false" standardStylesheets="false"  showHeader="false"  applyHtmlTag="false">
	<head>
        <style  type="text/css">
           
            
            .mark {
               	background: url({!$Resource.MarcaFL}) no-repeat;
               border: 2px solid black
           		font-family: "Arial Unicode MS", Tahoma,sans-serif;
            	font-size: 9pt;
            	width=50%;
            	height=50%;
            	position:relative;
            	background-size:contain;
            }
			div{
            	
           		font-family: "Arial Unicode MS", Tahoma,sans-serif;
            	font-size: 9pt;
            	width=100%;
            	position:relative;
            	text-align:left;
            }
            .right{
            	float:right;
            	
            	width: 50%;
            	border=1;
            }
            .left{
            	float:left;
            	
            	width: 50%;
            }
            .Left3{
            	
            }
            .Mid{
            
            
            }
            .Right3{
            
            }
            p{
            	font-size:20px;
            	color:#365f91;
            }
             .Equipo{
            	font-family: "Arial Unicode MS",Tahoma,sans-serif;
            	color:rgb(196,89,17);
            	font-size: 9pt;
            }
            .tabla{
            	font-family: "Arial Unicode MS",Tahoma,sans-serif;
            	font-size: 9pt;
            	color:rgb(0,0,0);
            }
            span{color:rgb(31,77,120);}
            b{font-weight:bold;}
            strong { font-weight: bold; }
           
            .T {font: bold 20px; color:black; }
        </style>
    </head>
	<body padding="20">
        <div >
           
            <img src="{!$Resource.MarcaFL}" style="position:absolute; width:100%; height:75%; opacity:.2;"/>
       	<div>
            <center>
        	<h1 style=" font: bold 2.5em 'Gotham Book', Arial, sans-serif;">
                
            
                                            Some stuff...
                 
                </h1>
        </center>
            </div>
</body>
</apex: page>
{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}
{!requireScript("/soap/ajax/30.0/apex.js")}
var oppObj = new sforce.SObject("Opportunity");
oppObj.Id = '{!Opportunity.Id}'; 
var result = sforce.connection.update([oppObj]);
if (result[0].success=='false') {
alert(result[0].errors.message);
}
else {
sforce.apex.execute('ApexClass', 'methodName', {optyId:'{!Opportunity.Id}', action:'Default'});
alert('{!$Label.Success}');
}
}
document.location = '/{!Opportunity.Id}';

I've simply addeed the entire code to vf page, standardcontroller as Opportunity.
I need to use CSS as well so that the error msg can be displayed in left top instead of the alert box which displayed at the center on top.

Please help ASAP.
Hello,

I am trying to compare two strings which have a Semi coloumn. I have used split but I am unable to compare the strings. In the below example, the debug gives an error for BALL but other strings pass. Can anyone help me what I am I missing here?
 
STRING TEST1 = 'MY ; BALL ; CAR; PEN';
LIST<STRING> TEST2 = TEST1.SPLIT(';');
SYSTEM.debug(TEST2);

STRING TEST3 = 'MY ; BALL; CAR';
for(string test4:TEST3.split(';')){
    system.debug(test4);
    if(TEST2.contains(test4)){
        system.debug('working');
        system.debug(test2);
    }
    else{
        system.debug('not working');
    }
}

 

trigger DateofBirth on Account (before insert) {
    for(Account a:trigger.new){
        if(a.Date_of_Birth__c!=NUll && ((system.today()- a.Date_of_Birth__c)/365 <=18)){
            a.Date_of_Birth__c.adderror('Age should be more than 18');
        }
    }
}

 

error i am facing:

Date expressions must use Integer or Long