• Malika Pathak 9
  • SMARTIE
  • 1525 Points
  • Member since 2020
  • Cloud Analogy

  • Chatter
    Feed
  • 48
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 308
    Replies
Hii,
I have created a LWC component and deployed to my org. I want to use that component in home page. But page edit section i can't see my lwc component but my aura components is showing there why ??
I have create a demo lwc component and only edit the html file.
Can any one help me i am not able to recognised why this is not showing?? 
Hii,
I want to simply find the number of Contacts linked with each account. So i use aggregate query for this. I want to debug Account name with number of contacts. But it shows "Field must be grouped or aggregated: Name" and i have already group it by accountid. 
My query is given below-

list<sobject> totalContactVsAccount=[select count(id) totalContact,accountid,account.name from contact where  accountid!=null group by accountid limit 10000];
        for(sobject obj:totalContactVsAccount){
            system.debug(obj);
        }
I have set the profile level security as Read for a particular object and the OWD is Read/Write for that object. As ben told that out of Profile level security and OWD ,the most restrictive one wins. But it doesn't look  the case, even the profile being more restrictive here I am still able to edit the records of that particular object.

Could someone please explain me this in detail.
While i am connecting to the post is show authentication failure like this -
{
    "error": "invalid_grant",
    "error_description": "authentication failure"
}
I have also created the connected app.
I have fill the body data as form-data given below-:
1. end point url -: 'https://login.salesforce.com/services/oauth2/token'.
2. client_id - 'my clent id'.
3. client_secret -'my client secret'
4. grant_type - 'password'.
5.password- 'my salesforce org password'.

please see where i am wrong??
 
Hi, I am new to salsforce intigration. I want to make callout in another salesforce org to create contacts. Can anyone help me how i will do this?
I have already craeted the connected app in my org and get the client id,client and security token.
Object “Y” => Detail to “Contact” MD Relationship
Object “Z” => Detail to “Y” Lookup
if amount field on “Z” is more than 10000 send an email to its grandparent Contact.
Hi, i have just started salesforce and i have a situation in which i want to insert 300 contacts for each account and i have 100 accounts in my salesforce org. i have already read some articles on batch apex but i'm unable to understand how to do it. Thanks in advance if anyone solve this for me.
Hello,

I need to get a substring from a text. Conditions:
  • starts with W200
  • can be different length
  • can be followed by a space, comma, other character (not a number) or nothing
Examples:
"Test W200123456 test" -> W200123456
"Test W200123" -> W200123
"W200123456789, test" -> W200123456789

I have a code that works if the substring i need is followed by a space.

String myString= 'my order W200454545 tests';
Integer index = myString.indexOf('W200');
Integer index2 = myString.indexOf(' ', index);
String newValue = myString.substring(index, index2);

How can I account for all other options?
Hi  Team,

Can you help me in understand what is a masterLabel in saleforce i  am having a custom metadata (Support_Tier__mdt)

$CustomMetadata.Support_Tier__mdt.Bronze.MasterLabel.
I am creating a filed on account object i am trying to defalut value as Bronze but didn't undertand the usage of MasterLabel

Thanks,
Vijay.
How can i throw error msg via apex if i have a field name birthdate in vf page and if birthdate is less than 18 years it throw error while i am saving record ..
Can somenone please help.

Thanks,
 
HI,

We have a custom object called ''Banner''. Whenever a user creates an opportunity, they add a banner to that opportunity. Now, whenever a user closes an opportunity, they clone it and name it ''Renewal (opportunity Name). This way they have created another opportunity for the same business to sell them again in future. 

Now, when they clone the opportunity, the Banner details don't get cloned so they have to add the Banners again. Some opps have 10+ Banners so they have to add them again. Banner is shown as a related list on the opportunity page. How can I get Banners to be cloned with all the information when they clone an opportunity? Can someone please help me with the trigger to achieve this?

Thanks 
hi everyone,
I'm a noob here just started using salesforce.

can somebody provide me code to create custom objects.
i know how to make manually
I'm having issues with my code as it says array out of bound.  can somebody please tell me why is error occur
i tried lots of time but it is not working in case object 
anyone help my why it is not working in case object
 
What is the formula of getting Current month first date and current month last date ?
I tried to enable customer support but it's not happening... How do i raise a case??
I am trying to built a age calculator. calculator take input from calendar and output age. but this program don't show anything.

Agecalculator.html
<template>
    <lightning-card  title="Age Calculator">
        <lightning-button variant="brand" label="Calculate"  slot="actions" onclick={calculateDOB}></lightning-button>
        <p class="slds-p-horizontal_small">
            <lightning-input type="date" name="BirthDate" label="Enter Your Date Of Birth" placeholder="type here..." value={birthdate} onchange= {handleChangeNum1}></lightning-input>
            result---{result}
        </p>
    </lightning-card>
</template>
AgeCalculator.js
export default class AgeCalculator extends LightningElement {
    @track result;
    @track birthdate;
    today = new Date();


    handleChangeNum1(event){
        const inpurdate = event.target.name;
        const inputvalue= event.target.value;
        if(inpurdate=='BirthDate'){
            this.birthdate=inputvalue;
        }

    }
    calculateDOB (event) {

        this.result=today.getfullyear-this.birthdate.getfullyear;
    }
}


 
Hii,
I have created a LWC component and deployed to my org. I want to use that component in home page. But page edit section i can't see my lwc component but my aura components is showing there why ??
I have create a demo lwc component and only edit the html file.
Can any one help me i am not able to recognised why this is not showing?? 
Hii,
I have have demo lwc component named as DemoLwc
and i have create a new css file in that component called main.css.
But the problem is that it is not working.
can anyone help me how i will use my css file file in that component.
Hii,
I want to simply find the number of Contacts linked with each account. So i use aggregate query for this. I want to debug Account name with number of contacts. But it shows "Field must be grouped or aggregated: Name" and i have already group it by accountid. 
My query is given below-

list<sobject> totalContactVsAccount=[select count(id) totalContact,accountid,account.name from contact where  accountid!=null group by accountid limit 10000];
        for(sobject obj:totalContactVsAccount){
            system.debug(obj);
        }
I have set the profile level security as Read for a particular object and the OWD is Read/Write for that object. As ben told that out of Profile level security and OWD ,the most restrictive one wins. But it doesn't look  the case, even the profile being more restrictive here I am still able to edit the records of that particular object.

Could someone please explain me this in detail.
This is the SOQL used in a trigger
 
List<User> usrlst = [SELECT Id FROM User WHERE UserRole.DeveloperName LIKE : '%Customer_Support_Rep%' and IsActive = True];


Instead of UserRole.DeveloperName i would like to use the UserRoleId = '78hjhajhjhjhj'

Hardcoding id is not a good practice.

I would like to store the RoleId in same place like custom setting or custommetadat type setting.

However i don't know how to access the value from the custom setting or custom metadata setting.

Can someone help or point to an example?

Thanks.

 
Hi All,

I have a requirment in my project. I need convert CreatedDate value Into Custom field  Timevalue using apex . I want only Time value not date. And Time values should be in 24 hour format such like that 14:00 of 2:00 PM . If anyone use these type functionality in your project please guide me.

Thanks & Regards
Sebastian Page 
Getting this error while verifying for the Apex Basics Chalenge.
There was an unhandled exception. Please reference ID: YTJIJSZO. Error: Restforce::UnauthorizedError. Message: INVALID_SESSION_ID: Session expired or invalid
While i am connecting to the post is show authentication failure like this -
{
    "error": "invalid_grant",
    "error_description": "authentication failure"
}
I have also created the connected app.
I have fill the body data as form-data given below-:
1. end point url -: 'https://login.salesforce.com/services/oauth2/token'.
2. client_id - 'my clent id'.
3. client_secret -'my client secret'
4. grant_type - 'password'.
5.password- 'my salesforce org password'.

please see where i am wrong??
 
Hi, I am new to salsforce intigration. I want to make callout in another salesforce org to create contacts. Can anyone help me how i will do this?
I have already craeted the connected app in my org and get the client id,client and security token.
Hello all,

So I have a small lwc where I want to enable a button when an input is not empty but I can not seem to get it to disable the button again if the value in the input field is deleted.

Methods I have tried:
event.target.value == undefined
event.target.value == null
event.target.value.length < 1

I imagine this is possible so I must be missing some key information about event.target.value.

Any help or infromation would be very helpful!

Thanks in advance.
User-added imageI have lookup field name 'Courier Service' with default lookup showing name(here auto-number). But i want to show field other than name. 

How this is going to be ?? 

Thanks in Advance. 

 
Hi, i have just started salesforce and i have a situation in which i want to insert 300 contacts for each account and i have 100 accounts in my salesforce org. i have already read some articles on batch apex but i'm unable to understand how to do it. Thanks in advance if anyone solve this for me.
HI All,

I am trying to write a trigger on object1 i.e after insert/ after update to create record on object2. But I am getting error (Apex heap size too large: 39897844) on saving record on object1.

Thanks in advance. 
  • March 31, 2021
  • Like
  • 0
<button class="btn-view-all" onclick="openall()">View All   </button>

JS function
function openannouncement(){
            var urlString=window.location.href;
            var baseURL = urlString.substring(0, urlString.indexOf("/_ui"));
            var siteBaseURL = baseURL + '/s';
            var redirectUrl = siteBaseURL + '/viewall'
            window.open(redirectUrl,"_self");
         }

after clickig on view all button
browser URL is changing as expected but page is not redirecting