• Sukanya Banekar
  • NEWBIE
  • 345 Points
  • Member since 2014
  • Salesforce Technical Lead
  • Maantic Inc


  • Chatter
    Feed
  • 10
    Best Answers
  • 3
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 115
    Replies
Hi trying to convert date to a text string (for a pardot email) and am looking to change the date of 2023-01-01 to "January 1, 2023".  Is there a way to do this as a formula as one could do in Excel (Text(Date_name),"MMMM D, YYYY")
Hi All,

I have two picklist fields in vf page, i want to retain field dependency between the two in my page. I am using standard controller and no pageblock component used. Any ideas?

Thanks.
  • August 22, 2017
  • Like
  • 0
Hi,

I have in my Org the WorkOrder and WorkOrderLineItens Objects.
I want to display the result of a very specific SOQL query in a Visualforce page.
The point is, in my Apex SOQL query, I bring fields from both objects, and others related... so, how can I declare a single List to receive this SOQL result, with all the returned fields, from all objects?

I'm following this article, but It only uses fields fron a single object, so the List is declared based on that object..
https://help.salesforce.com/articleView?id=000205631&type=1

My SOQL looks like this:
select  	id, LineItemNumber, 
			PricebookEntry.Product2.Name,
			WorkOrder.WorkOrderNumber, WorkOrder.Tipo_de_Servi_o__c
FROM		WorkOrderLineItem
WHERE		UnitPrice = 0	AND 	
			WorkOrder.CreatedDate >= 2017-05-15T00:00:00.000+0000
ORDER BY	LineItemNumber ASC

In developer console, it runs fine:
User-added image

Some sugestion, or other reference that could help me on it?
Thanks.
I need assistance with creating a new record on a custom object Hardie_Builders__c everytime the Account checkbox Hardie Builder is set to true. It will only contain the hyperlinked Account Name. 
Hello,I want to add new values to picklist ,I import all class  which from https://github.com/financialforcedev/apex-mdapi  into my org.
I write a class named AddSegment.cls and  a test class  ,when I run test class to create Field ,it show error:Attempt to de-reference a null object, can someone tell me what wrong and what should I do.Thank you very much.
User-added image
User-added image

 
{!REQUIRESCRIPT("/xdomain/xdomain.js")}
{!REQUIRESCRIPT("/soap/ajax/39.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/39.0/apex.js")}
{!REQUIRESCRIPT("/support/console/39.0/integration.js")}

var Program='{!Program_Member_MVN__c.Program_Name__c}';
var Pname=sforce.connection.query("Select Program__c from Program_Names__c");
var rec16 = Pname.getArray('records');
var status='{!Program_Member_MVN__c.Status_MVN__c}';
var PmId='{!JSENCODE(Program_Member_MVN__c.Id)}'; 
var PName='{!Program_Member_MVN__c.Program_Name__c}'; 
var url;
if (sforce.console.isInConsole()) {
if(Program == rec16){
alert("You are on the wrong Program")
} 

else if(status == 'On Therapy')
{
url = "/apex/Milestone_skip?id="+PmId;
window.open(url,'_blank','toolbar=0,location=0,menubar=0,width=800,scrollbars'); 
}  
else
{
alert("Patient must be ‘On-Therapy’ before skipping to a milestone");
}
}

This is my java script on click button code.In this i am querying  custom setting here:var Pname=sforce.connection.query("Select Program__c from Program_Names__c");
And i want to compare to field to show a alert.So i have to multiple values in custom setting.So how can i access all the values given in the custom setting in the java script code?
<aura:component>
    <aura:attribute name="setMeOnInit" type="String" default="default value" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    
    <p>This value is set in the controller after the component initializes and before rendering.</p>
    <p><b>{!v.setMeOnInit}</b></p>
    
</aura:component>
================================
<aura:application >
    <c:test2/>
</aura:application>
=============================
({
    doInit: function(cmp) {
        // Set the attribute value. 
        // You could also fire an event here instead.
        cmp.set("v.setMeOnInit", "controller init magic!");
    }
   
})

 

Would it be possibile to filter null long text area fields in SOQL?

I need to run process where if a number of text area fields in contact are null then do something.

Thanks in advance!

 

Not sure but I cannot find a clear answer to this.  I have a status__c picklist value we want changed from "Installing" to "installed".   This should change based on a separate field that we created that has an "install_date__c" entry (date field). When system date matches this date field we have we would like the picklist value to change on status__c.   Any help would be appreciated!
Hello all,

I have a field Previous__c which is generated from a field update formula and shows the previous value of another field currentfield__c. Previous__c is correctly shown in standard detailpage layout but its null when I try to display it using    
<apex:outputText value="{!object.Previous__c }"/>.  I have also tried apex:outputfield, but its still the same

Can anybody suggest Where am I going wrong?
 

I am trying to validate user input in the Field Service Lightning screen flow. The validation works in debug mode (desktop), however when I execute the flow from FSL mobile app, it gives an error "unable to validate field. Please contact System Administrator."

I have tried so many formulas but none of them work in FSL:
I need to validate the user's input starts with 'P' as the first character and has 'O' as the fifth character.

(BEGINS({!EV_Charger_Serial_Number}, 'P') || BEGINS({!EV_Charger_Serial_Number}, 'p')) &&
  (RIGHT(LEFT({!EV_Charger_Serial_Number}, 5), 1) = 'O'||
        RIGHT(LEFT({!EV_Charger_Serial_Number}, 5), 1) = 'O')
Hi,

User-added image
I am getting above error while training the dataset. The dataset which I have used is from Einstein vision (mountainvsbeach). Also I have checked, the images are no longer than 2000 pixel.

 
Is it possible to update trained dataset in einstein API?
Hi,

User-added image
I am getting above error while training the dataset. The dataset which I have used is from Einstein vision (mountainvsbeach). Also I have checked, the images are no longer than 2000 pixel.

 
Hi trying to convert date to a text string (for a pardot email) and am looking to change the date of 2023-01-01 to "January 1, 2023".  Is there a way to do this as a formula as one could do in Excel (Text(Date_name),"MMMM D, YYYY")
I have a situation when Case Status field can be updated multiple times but what I need is once I made the status as closed, Date/Time closed field (under case object) should capture the 1st date time stamp when the case was closed and it should NOT be updated again irrespective of how many time status is getting changed.
Please help. Thanks in advance :)
Hi Team,

I got stuck in one  problem, Actuallly I need to send data from my apex class to vf page using platform events, but I'm stuck in how to subscribe my platform event in my vf page and get data.

kindly give soultion for the same.
I dleleted the original question I posted as I had the wrong criteria.

We have a Process Builder that is sending a pre class confirmation email 7 days prior to the class start date. Part of the criteria is that the scheduling Status=Completed so why would emails still be sent when the criteria on the Training Event = Void?

In one example I'm looking at the TE was created on 5/22/23 with a class start date initially of 8/9/23. The start date, while 'In-Discussion' status, was changed around a little but always occuring in early August and ended up being set to 8/5/23. The Scheduling status was then set to Completed on 6/15/23. Then on 7/6/23 the Scheduling Status was changed from Completed to VOID.

So why might the email still have sent 7 days prior to 8.5.23 when the status no longer matched the criteria=Completed when it was changed to Void on 7/6/23?

Does the system check the criteria one last time to make sure everything still matches before sending the email? That's what a Salesforce support agent told me years ago so not sure if that's true today but would seem if was checking on 7/29/23 it would have seen the VOID status no longer matched the criteria Scheduling Status=Completed. And thus the email should not have been sent.

So any ideas at all why the email was sent out ? 
 
So basically we have opportunity record types and user roles set up by business lines. We want to restrict editing of the Opportunities to where the record type and roles matchup. We have the OWD for opportunities set to private and a sharing rule giving Read/Write access based on the opportunity record type and the role. I look at the sharing heirarchy and it shows read access and write access for the correct record types. However edit access seems to only be controlled by the user's profile. If their profile has Opportunity edit access set, they can edit all opportunties, if it's not set, they cannot edit any opportunties.
Is there a correct way to set this up? Is there anywhere else I can look at to see why this would be occuring?
We have linked Opportunities and I use processes/flows to pass the values of certain fields from one Opportunity to another, for most this is straightforward as the value is static, i.e. a picklist value or text string.

However I have a custom field which is a formula to caluclate total cost and I am trying to pass the formula result to another Opportunity whenever the value changes. I have tried things like
VALUE ([Opportunity].AUS_Total_Group_Cost__c ) but it is not working.

Has anyone any suggestions as to how to make this work?

Thanks in advance
Hello
I am using $user to capture the current logged in user in a lightning flow, however, its not working in Field Service Lightning flow. Any ideas how to access the current logged in user in FSL?
Hello All, 

  i have scenairo, where i have to compare with single record with list of records and if i found duplicate record i will have to return duplicate record.

 Example : List<account> listAcc= [select id, name, type,startdate, enddate, designation, ( select id , name , email, from contact), (select name, id, stage from oppty) from account]

  Account  acc= [select id, name, type,startdate, enddate, designation, ( select id , name , email, from contact), (select name, id, stage from oppty) from account where id='XXXXXXXX'];

now i have to compare account (acc) record with all the list of records from listAcc  data with parent and child records. if i found  same record in then i have to return duplicate record found. 

Thanks 


 
I am receiving multiple FlowApplication error emails with a MyVariable ID which is the record ID + an extension e.g. 0Q041000000kv5oCAA. The Record ID is 0Q041000000kv5o and the extension is CAA.

I'm trying to figure out where I can find where I can troubleshoot this through the ID. Can someone guide me as to how I can navigate to 0Q041000000kv5oCAA?
  • August 24, 2017
  • Like
  • 0
Hi,

I have requirment, where i need to have diffrent loging pafes for my diffrent clients. 
Any idea how to have multiple login pages.

Thanks 
Hi All,

I have two picklist fields in vf page, i want to retain field dependency between the two in my page. I am using standard controller and no pageblock component used. Any ideas?

Thanks.
  • August 22, 2017
  • Like
  • 0
Hi,
I need lightning component for searching leads and display in another section.
please suggest me.
Hi, 

the below class is invoked via Process builder and meant to email a dynamic visualforce attachment. 
 
public class EmailInvoked {

    @InvocableMethod
    public static void sendEmail(List<Id> lstId){
        List<String> EmailIds = 'personal@example.com'.split(',');
        PageReference ref = Page.WorkDocket;
        Blob b ;
        b = ref.getContent();

        

        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();

        Messaging.EmailFileAttachment efa1 = new Messaging.EmailFileAttachment();
        efa1.setFileName('WorkDocket.pdf');
        efa1.setBody(b);

        String addresses;
        email.setSubject( 'Check VF From PB' +String.valueOf(DateTime.now()));
        email.setToAddresses( EmailIds  );
        email.setPlainTextBody('Hey there, I am an email Body');
        email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa1});
        Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});
    }
}

However, I would need to 
1. Not only have this email send to a static address but based on a field in the Case - Site_Email__c 
2. The Visualforce page is currently attached but only the static contect. For example apex:output fields are not rendered. How do i get the ID in the visualforce page to render correctly? 

Thank you. All help much appreciated. 
 
We have created Android application which has been integrated with sales force but we are getting the error message during authentication .Below are the error message

{"error":"invalid_grant","error_description":"authentication failure"}
We are using Kitkat 4.1 and 4.2 android version device.
Salesforce.com could not email the report to any of the specified recipients. Check that recipients are specified and that they have the appropriate permissions to view the report.

If you get this ^error:

Make sure you also check:
Setup > Customize > Reports & Dashboards > Email Notifications > Allow Reports and Dashboards to Be Sent to Portal Users

Posting this here since it took me a long time to find this checkbox.