• madhu_ra
  • NEWBIE
  • 34 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 26
    Questions
  • 32
    Replies
Can anybody please let me know if there's a way to include Standard lightning component in a visualforce page?

Simply what I'm trying is to have lightning lookup component in a Visualforce page(which uses SLDS) since we need 'Create New' function to be there in lookup window(popup). Enabling 'Quick Action' won't help as it's by passing validation as well as can't add/ remove fields from the layout.

Thank in advance
We have a process builder (on Case object) in a flow of sending reminder emails as in below functional flow.
Criteria met > Update a field on Case(scheduled action) > Case trigger checks for field update and send reminder email.

Recipient will be an person account which is a grand parent object to Case. The personEmail of the person account is being captured, composed the email and send in the trigger.

My question is does Salesforce keep a runtime reference of entire scheduled action flow(up-to trigger and sending email) until it get fired? Or should Salesforce execute the trigger at the real execution time of the scheduled action?

Reason why asking is we observed that even if we change the person account lookup before scheduled action time met, trigger still sends the reminder email to the previous person account personEmail. This sounds like Salesforce keep a runtime reference of entire process of scheduled action.

Appreciate any comments/ confirmation on this.
I have a trigger validation in Case which is working fine. When I'm in the Case list view, trying to inline edit even the validation works the errors are not showing up. Realised that response will be in a popup with success and failed records. But when I try to open the popup, it doesn' contain any value. Any guidance is appreciated.

list view inline edit response pupop empty
Thanks in advance
String[] types = new String[]{'Account'};
List<Schema.DescribeSobjectResult> results = Schema.describeSObjects(types);
Map<String, Schema.RecordTypeInfo> rmap = new Map<String, Schema.RecordTypeInfo> ();

for (Schema.RecordTypeInfo ri: results[0].getRecordTypeInfos()) {
        rmap.put(ri.getname(), ri);//use ri.getRecordTypeId() for an Id map 
    }
system.debug('@@@@@rmap@@@@'+rmap);

+++++++++++++++++++++++++++++++++++++++++++++++++++++
in the above debug log for record type i am getting the translated values for record types
Hi all,

I am trying to get datetime picker in html input element on my vf page but i am getting below error:
Uncaught TypeError: Cannot read property 'addEventListener' of null
Uncaught TypeError: Cannot read property 'currentStyle' of null


Because of this i am not able to get date time picker.
can anyone help me in resolving this issue
Hi All,

I have created a new Lookup field on standard Prdoduct object which points to one of my custom objects. Field has been created successfully but when I'm trying to set  a value by clicking the magnifying glass the popup doesn't show any records of my Custom object. 
As suggested in some other posts I checked for Search settings in Setup > Customize > Search > Search Settings. Custom objects has been enabled for enhance search at there. Can anyone help me to figure out what is going on please?

Thanks,
Madhura
Hi All,
There are lot of discussions on Lead conversion. I'd just need to know is there any possibility to track whether the Account is being created upon a Lead conversion and if collecting information of the lead inside an Account before insert trigger.
Lead to Account relation can be handled in a Lead trigger since convertedAccountId field is there. But is there any relevant field in Account object?

I'm trying to overcome a "duplicate unique field" issue and thinking handle this in Account before insert trigger.
Hi All,

Can anyone explain the process of building an hybrid_local app in release mode? I have developed an mobile app using forcedroid and it's now almost ready to go. I need to know how to build my app in release mode as a sign application so that it can be published in Android AppStore.

Thanks,
Madhura
Does anyone expereince above issue? Recently I noticed that the query history in my developer console is not well maintained. The last queries that I executed are not in the history list. Is this a salesforce bug? Any workaround?

Thanks,
Madhura
I set up the mobile sdk and successfully created a new hybrid_local project which is working fine. My problem is in the access permission allow/ deny page it's showing "Salesforce Mobile SDK Sample App is requesting permission for ..." something like this. Where I can change this app name? So that it'll view like "MyApp is requesting permssion for..." ?

Thanks
HI ,

I am trying to move some new fields and getting this error in one my test class . I can manually cretae new fileds but wnat to knoiw why this error is Occuring . And my test class was running perfectly and now i get this error .

Class TestOverrideOpportunityNameTrigger
Method Name testNotUltimateButLocalClient
Pass/Fail Fail
Error Message System.LimitException: Too many SOQL queries: 101
Stack Trace Trigger.OpportunityBeforeTrigger: line 40, column 1

// This is the method in Test class

static testMethod void testNotUltimateButLocalClient() {
        // specify local client only and pull the ultimate client by traversing hierarchy
        System.debug('Testing insert case where Ultimate Parent Client IS NOT populated but Local Client IS populated which has Parent Account tied to it.');
        Account ultimateAccount= new Account(name='TestOverrideClient Thirteen',BillingStreet='TestOverrideThirteenSt', Client_Short_Name__c ='ulttiCL',
                Phone='123454321',BillingState='ca', BillingPostalCode='95456', BillingCountry='US', BillingCity='TestOverrideThirteenCity', Ultimate_Parent__c = true);
        insert ultimateAccount;
        
        Account localAccount  = new Account(name='TestOverrideClient Fourteen',BillingStreet='TestOverrideFourteenSt', Client_Short_Name__c ='localCL', Ultimate_Parent_Client__c =ultimateAccount.id,
                        BillingState='ca', BillingPostalCode='95457', BillingCountry='US', BillingCity='TestOverrideFourteenCity', Ultimate_Parent__c = false,phone='111-111-1111');
        insert localAccount;
        
        Opportunity ultimateOpp = new Opportunity(Local_Client__c=localAccount.Id, Name='testoppfornamechange',Solution_Type__c='Standard',
                        Opportunity_Short_Description__c='test desc',Active_Latent__c='Active',Opportunity_Type__c='parent',
                        StageName='plan & engage',CloseDate=System.today()+2);
        
        insert ultimateOpp;
        
        Opportunity ulOpp = [select id, name, accountId, Local_Client__c from Opportunity where id =:ultimateOpp.Id];
        system.assertEquals('TestOver - 0 - test desc', ulOpp.Name);
        system.assertEquals(localAccount.id, ulOpp.Local_Client__c);
        system.assertEquals(ultimateAccount.Id , ulOpp.accountId);
        
        System.debug('Testing update case where Ultimate Parent Client IS NOT populated but Local Client IS populated which has Parent Account tied to it.');
        Account ultimateAccount2= new Account(name='TestOverrideClient Fifteen',BillingStreet='TestOverrideFifteenSt', Client_Short_Name__c ='ulttiC2',
                BillingState='ca', BillingPostalCode='95458', BillingCountry='US', BillingCity='TestOverrideFifteenCity', Ultimate_Parent__c = true,phone='111-111-1111');
        insert ultimateAccount2;
        
        Account localAccount2  = new Account(name='TestOverrideClient Sixteen',BillingStreet='TestOverrideSixteenSt', Client_Short_Name__c ='localC2',Ultimate_Parent_Client__c = ultimateAccount2.id,
                        BillingState='ca', BillingPostalCode='95459', BillingCountry='US', BillingCity='TestOverrideSixteenCity', Ultimate_Parent__c = false,phone='111-111-1111');
        insert localAccount2;
        ultimateOpp.AccountId = null;
        ultimateOpp.Local_Client__c = localAccount2.id;
        update ultimateOpp;
        Opportunity ulOpp2 = [select id, name, accountId, Local_Client__c from Opportunity where id =:ultimateOpp.Id];
        system.assertEquals('TestOver - STD - 0 - 0 - 0 - test desc', ulOpp2.Name);
        system.assertEquals(localAccount2.id, ulOpp2.Local_Client__c);
        system.assertEquals(ultimateAccount2.Id , ulOpp2.accountId);
        
    }

This is the code mentioned in Stack Trace

trigger OpportunityBeforeTrigger on Opportunity (before insert,before update) {
   Set<Id> parentOppIdSet = new Set<Id>();
   Set<Id> validOppIdSet = new Set<Id>();
    for(Opportunity opp: Trigger.new) {
        if(opp.Parent_Opportunity__c != null) {
            if(opp.Opportunity_Type__c == 'Parent')
                opp.addError('Parent should not have another opportunity as parent.');
              
            parentOppIdSet.add(opp.Parent_Opportunity__c);            
        } else {
            if(opp.Opportunity_Type__c == 'Child')
                opp.addError('Please enter a Parent Opportunity. ');
            validOppIdSet.add(opp.Id);
        }        
    }
    System.debug('valididset'+validoppidset);
    if(validOppIdSet != null) {
        try {
            Map<Id, Opportunity> childOppMap = new Map<Id, Opportunity>([Select Id, Name, Parent_Opportunity__c from Opportunity where Parent_Opportunity__c IN: validOppIdSet limit 30]);
            Set<Id> errorOppIdSet = new Set<Id>();
            List<OpportunityLineItem> oppLineItemList = new  List<OpportunityLineItem>();
            if(childOppMap != null && childOppMap.size() > 0) {
                Set<Id> childOppIdSet = childOppMap.keySet();
                try{
                    oppLineItemList = [Select Id, OpportunityId from OpportunityLineItem where OpportunityId IN: childOppIdSet limit 50];
                }
                catch(Exception e){
                }
                if(oppLineItemList != null && oppLineItemList.size() > 0) {
                    for(Opportunity childOpp: childOppMap.values()) {
                        Id childOppId = childOpp.Id; 
                        Boolean isOppLineItemExists = false;
                        for(OpportunityLineItem oppLineItem : oppLineItemList) {
                            if(childOppId == oppLineItem.OpportunityId) {
                                isOppLineItemExists = true;
                                break;
                            }
                        }
Thanks 
Akhil

I have a SOQL filter on a DateTime field as below
SELECT fieldList FROM myObj WHERE CALENDAR_MONTH(myDateTimeField)=12 AND WEEK_IN_MONTH(myDateTimeField) IN : (4,5) AND myDateTimeField = THIS_YEAR
This returns results for the myDateTimeField = 2014-01-01 00:00 as well.
SELECT fieldList FROM myObj WHERE CALENDAR_MONTH(myDateTimeField)=2 AND WEEK_IN_MONTH(myDateTimeField) IN : (4,5) AND myDateTimeField = THIS_YEAR
This returns results for myDateTimeField= 2014-03-01 00:00 as well.

How or why is this happening? According to the documentation WEEK_IN_MONTH(DatetTime) considers 1st day through 7th day of the month as the first week. Also CALENAR_MONTH(DateTime) should returns 1 for Jan, 4 for April etc.

But what is happening there in my case? Any thoughts?
Before '14 release there was a invaluable feature in salesforce to check the covered/uncovered code segments of a particular class or trigger. They were clearly showed with pink and red color so that developers can easily manage the code coverage. But recently forums say it has been moved into developer console. But I can't find that feature even in the console. Please help if anyone know the job.

Hi,

 

I am making a simple VF page with some date fields.

 

There is also a javascript to gray out boxes depending on which radio button is selected.

 

However, how can I stop the date fields from being autopopulated with the current date and time? I want them to be blank by default.

 

Date Fields

 

Here is the code:

 

<!-- Define controller, create main page block and first section -->
<apex:page controller="dashboardRadio">
<apex:PageBlock title="Dashboard">
<apex:pageBlockSection title="Select Type of Update" columns="1">

<!-- Java script to gray out n/a boxes -->
<script type="text/javascript"> function getActive(selectedValue) 
     {
        if( selectedValue == 'noDate') 
           { 
          var ele=document.getElementById('{!$Component.form1.startDate}');
              ele.disabled =true;
          var ele=document.getElementById('{!$Component.form1.endDate}');
              ele.disabled =true;
           }
        else if(selectedValue == 'oneDate')   
           {
           var ele=document.getElementById('{!$Component.form1.startDate}');
               ele.disabled =true;
           var ele=document.getElementById('{!$Component.form1.endDate}');
               ele.disabled =false;
           }
        else if(selectedValue == 'twoDate')
           {
           var ele=document.getElementById('{!$Component.form1.startDate}');
               ele.disabled =false;
           var ele=document.getElementById('{!$Component.form1.endDate}');
               ele.disabled =false;
           }
    }       
</script>

<style>
    .dateFormat{display:none;}
</style>



<apex:form id="form1">
<apex:selectRadio value="{!selectedValue}" layout="pageDirection" onchange="getActive(this.value);">
        <apex:selectOption itemValue="noDate" itemLabel="No date & time"/>
        <apex:selectOption itemValue="oneDate" itemLabel="Single date & time"/>
        <apex:selectOption itemValue="twoDate" itemLabel="Date & time span"/>
            </apex:selectRadio><p/>

        
      Start Date  <apex:inputField value="{!c.dashboard_start_date__c}" id="startDate" required="false"/><br></br>
    End Date  <apex:inputField value="{!c.dashboard_end_date__c}" id="endDate" required="false"/><br></br>
</apex:Form>
</apex:PageBlockSection>

</apex:PageBlock>        
</apex:page>
 

 

 

 

Thanks!