• Kakasaheb EK
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 10
    Replies
({
    doInit : function(component, event, helper) {
        helper.LoadAccount(component, event);
        helper.LoadApexAttribute(component, event);
        testmethodTest();
    },
    
    testmethodTest : function() {
        var action = component.get('c.myContact');
        action.setCallback(this, function(response) { 
            console.log('1111------');
            var state = response.getState();
            console.log('1111------'+state);
            if (state === "SUCCESS") {
                console.log('Test-' + JSON.stringify(response.getReturnValue()));
                component.set('v.MYContcat', response.getReturnValue());
            }
        });
        $A.enqueueAction(action);
    },
    
})

 
1. Created component 

User-added image
2. User-added image

Please help me, Why its not visible in 2nd section..?
Hi Guys,

I am trying achieve 100 % test class coverage , but somehow I am not able to achieve.

Could you please help me here..!!

Trigger Code : 

trigger DuplicateStudent on Student__c (before insert) {
       //Get all Student__c related to the incoming Student records in a single SOQL query.
       Student__c[] studentsList = Trigger.new;
       Set<String> emailSet = new Set<String>();
       for(Student__c s : studentsList){
        emailSet.add(s.Email__c);
       }
       //Get list of duplicate Students
       List<Student__c> duplicateStudentList = [Select s.Name, s.Email__c From Student__c s where s.Email__c IN :emailSet];
       Set<ID> duplicateEmailIds = new Set<ID>();
       for(Student__c s : duplicateStudentList){
        duplicateEmailIds.add(s.Email__c);
       }
       for(Student__c s : studentsList){
            if(duplicateEmailIds.contains(s.Email__c))              {
                s.Email__c.addError('Record already exist with same email Id');
            }
       }
}

Test ClasS : 

@isTest
private class DuplicateStudentTrigger_Test {
    
    
         static testMethod void myUnitTest() {
        Account acc = new Account();
        acc.Name = 'SFDC';       
        insert acc;

        Student__c s = new Student__c();
        s.Name = 'Om Test';
        s.Email__c = 'admin@JitendraZaa.com';
        s.Account_Name__c=acc.ID;
        
                   
        try
        {
            insert s;
        }
        catch(System.DMLException e)
        {
            System.assert(e.getMessage().contains('Record already exist with same email Id'));
        }
    }
}
Hi All,

i am getting above error plese help...

public static void onAfterUpdate(list<BUD__c> newObjects){ 
        for(BUD__c b: newObjects){
             if (Trigger.oldMap.get(b.Id).Account_Name__c != Trigger.newMap.get(b.Id).Account_Name__c){
             }
            
        }
Hi All,

I have below requirement :

1. Team Object.
2. Member Object .
3. Team_Member Junction object(5-6 records has been created).

I want to design a visualforce page in below way.

1. When we click on Team Name respective team members should display on the basis of Junction object and then send mail to team members.

Please help for SOQL ; On which object I need to write soql to achieve this functionality..?

Thanks in Advance.

Sachin
HI All,
I have printed all standard and custom object in drop down list.

But again ,I want filter it to print sales object and custom object only in drop down list.

Please help.

Kakasaheb.drop down object list of org.
Hi All,

I am facing  below error whil loading records in Knowledge object.
 1.In knowledge I have created File as custom field.
 2.I am able export records from data loader with File(field) content in same object(knowledge).
 3.While loading I am getting this error.
 
 Please help.User-added image
Hi All,
I have created "Electronic_Device__c" as cusom object and added two picklist in that.
1.Device Type(Master Picklist)
2.Device_Name__c

VF Page Code
 <apex:page controller="FieldSetTest" tabStyle="Product2">
  <apex:form >
       <apex:pageBlock >
            <apex:pageBlockSection title="Device Details" collapsible="False" columns="1">
                <apex:repeat value="{!$ObjectType.Electronic_Device__c.FieldSets.Device_Field_Set}" var="f"> 
                    <apex:inputField required="{!f.Required}" value="{!device[f]}" />
                </apex:repeat>
            </apex:pageBlockSection>
       </apex:pageBlock>
    </apex:form>
</apex:page>

Controller code:-

public class FieldSetTest{
 public Electronic_Device__c device { get; set; }
     
 public FieldSetTest(){
     device = new Electronic_Device__c();
 }
}


I am able to acheive 90% percent but when I running tha page output display this way...
Not visible Device name...why..??
Hi All,
I have controller & Helperclass.
Here I am calling all DML operation in helper class through controller, but somes times error will come in Helper class
so I can't capture this system messages.
please give me soultion to capture the system messages(say validation error message).

Thanks in Advance.
Sachin.
Hi All,
I have created one vf & controller.
On vf page i am showing checkbox values & backendly I am using multi piclist field.

So when I clicking checkbox & storving it get strorved.

Now I want to do validation of checkbox as client side So I need to featch values in javascript & need to do validation.

But I am not able to do validation of validate checkbox .

Plz review the code its little tricky.
My VF page :- 

<apex:selectCheckboxes id="activityTracking" value="{!activityTracking}"    layout="pageDirection" >
   <apex:selectOptions value="{!activityTrackinglsOptions}"/>
 </apex:selectCheckboxes>

<script>
       function validate()
       {
          var test= JSON.serialize('{!activityTracking}');

      }
</script>
Controller:-
 public list<String> activityTracking { get;set;}
 activityTracking = new list<string>();

So plz tell me how I capture value in javascript..??

Thanks in Advance.
Kakasaheb
Hi All,
I want to develop small POC in SFDC,below are the requirement .
    1.Page is VF page.
    2.It should support Bootstarp.
    3.I can use html component in page say input type="text" as like html5.
    4.I should send this data to controller & need to get save.
please help me.

--Sachin


 
Hi All,
I am unable to align a save button to center ; I tried using these option
 1.used div block with css.
 2.location=bottom using apex.
 3.tryied using css as well 

Code :-

<apex:page standardController="Account">
 <apex:form>
  <apex:pageBlock>
    <apex:pageblocksection columns="1"> 
                  <apex:commandbutton id="btnCenter" value="Save" Action="{!save}" /> 
  </apex:pageblocksection>   
   </apex:pageBlock>    
  </apex:form>   
</apex:page>

I want button align center only in apex:pageblocksection

Please adivise,

Kakasaheb.
Hi ,

I am trying print state ,city automatically on VF page using sfdc api ; I don't want as harcoded.

Thanks in Advance,
KK.


 
I have created Process Builder on custom object 'Alert ' , There is a look up to MTO ,so once the Alert is created ,the fields related to MTO on Alert are not getting populated. But after creating Alert record if I edit any field then all the related fields are getting populated. I am not understanding why my process builder is behaving like this.
User-added image
User-added image
User-added image
User-added image
User-added image
I am trying to figure out whether we can set a date field to todays date if its NULL. When the user moves the status to ‘complete’ I’d like to give them the option to enter an XYZ date, and if they don’t then this field should be filled with today’s date.  I have created a workflow rule that does most, but not all of this.
The workflow rule successfully pushes todays date if the field is null, however if the user pressed ‘edit’ and changes the Status as "Complete" along with adding an XYZ date all in the same ‘edit’ action, the date they enter is overwritten with “today”.  I need to accept the entered value and not overwrite it.  Is this possible using workflow or process builder. I know I can do it using the trigger but I want to avoid writing a trigger?
 
I have one custom object name something
And i have contact object custom record name and fields should be send to contact current email id  
I’m working on booking scheduler app using lighting on this. In last page when I was booked the appointment there is Escalate button which is call the aura method passing event ID This is the process -update "Escalation Date/Time" with current date/time Now I'm trying to build a workflow rule to send an email alert if clicking the Escalation

I'm trying to build a workflow rule to send an email alert if clicking the Escalation(Event). I haven't found an easy way to do this using workflow rules and may need a formula. Anyone know of a simple way to do this (with our without a formula?)send email to supervisor(Agent Object)
({
    doInit : function(component, event, helper) {
        helper.LoadAccount(component, event);
        helper.LoadApexAttribute(component, event);
        testmethodTest();
    },
    
    testmethodTest : function() {
        var action = component.get('c.myContact');
        action.setCallback(this, function(response) { 
            console.log('1111------');
            var state = response.getState();
            console.log('1111------'+state);
            if (state === "SUCCESS") {
                console.log('Test-' + JSON.stringify(response.getReturnValue()));
                component.set('v.MYContcat', response.getReturnValue());
            }
        });
        $A.enqueueAction(action);
    },
    
})

 
Hello Admins and Developers,
I need to build a formula or process builder on Order object where the Order date is less than all other orders.
I know how to compare between two date fields but I'm bit confused here as we need to compare same date field between multiple records.
Can anyone please help me in this issue?

Thank you in advance,
Krish
Hi Guyz,

I've this requirement so I need some help for this:---
Business has requirement to hide "Authorization Approved" picklist value when current status of the claim is "Draft" or "Manual Review" and the logged-in user is not payment processor permission set user.

Note- Authorization Approved, Draft and Manual Review are picklist value of the same picklist field which is 'Status' and object is Case.

Thanks i advance
  • July 10, 2018
  • Like
  • 0
Vf
<apex:page controller="DisplayPicklistvalue">
<apex:form >


<apex:pageBlock title="Country" >
      <apex:pageBlockTable value="{!Countries}" var="a">
         <apex:column headerValue="{!Countries}" >
         <apex:inputCheckbox value="{!Countries}"/> 
         
         
         </apex:column>

      </apex:pageBlockTable>
   </apex:pageBlock>
Controller
public class DisplayPicklistvalue {
public List<String> getCountries()
{

List<String> options = new List<String>();
        
   Schema.DescribeFieldResult fieldResult =
 OfficeLocation__c.Country__c.getDescribe();
   List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
        
   for( Schema.PicklistEntry f : ple)
   {
      options.add(f.getvalue());
   }       
   return options;
   }
  


}


 
Hi All,

I am facing  below error whil loading records in Knowledge object.
 1.In knowledge I have created File as custom field.
 2.I am able export records from data loader with File(field) content in same object(knowledge).
 3.While loading I am getting this error.
 
 Please help.User-added image
Hi All,
I have created one vf & controller.
On vf page i am showing checkbox values & backendly I am using multi piclist field.

So when I clicking checkbox & storving it get strorved.

Now I want to do validation of checkbox as client side So I need to featch values in javascript & need to do validation.

But I am not able to do validation of validate checkbox .

Plz review the code its little tricky.
My VF page :- 

<apex:selectCheckboxes id="activityTracking" value="{!activityTracking}"    layout="pageDirection" >
   <apex:selectOptions value="{!activityTrackinglsOptions}"/>
 </apex:selectCheckboxes>

<script>
       function validate()
       {
          var test= JSON.serialize('{!activityTracking}');

      }
</script>
Controller:-
 public list<String> activityTracking { get;set;}
 activityTracking = new list<string>();

So plz tell me how I capture value in javascript..??

Thanks in Advance.
Kakasaheb