• Kumaravel Mathivanan
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Cognizant

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 10
    Replies
Hi,

I gone through this below articles even though I couldn't come to the process flow solution.

https://help.salesforce.com/articleView?id=lex_encourage_work_welcome_mat_create.htm&type=5

Can anyone explain step by step process that how to create this component manually or into the org and how to upload to the server ?

 
How to assign or use "User Layout" to create New User from custom button in lightning ?
While saving the user object record i am getting this below error :
Review the errors on this page. LanguageLocaleKey field is required.
LanguageLocaleKey field is not available on User object page layout.
Please assist me.
I have one custom object named as XYZ which is lookup relationship to Contact object.
When i am seeing contact record page XYZ related list block it is shows null value present if contact first name is blank.

i.e : 
XYZ 
Action                      Name               CreatedDate                   LastModifiedDate                Status
Edit | Delete            null Kumar         9/19/2017                       9/19/2017                           Active
Edit | Delete            Ajith Kumar        9/19/2017                       9/19/2017                           Active



Can anyone known this ?
 
Hi,

I gone through this below articles even though I couldn't come to the process flow solution.

https://help.salesforce.com/articleView?id=lex_encourage_work_welcome_mat_create.htm&type=5

Can anyone explain step by step process that how to create this component manually or into the org and how to upload to the server ?

 
How to assign or use "User Layout" to create New User from custom button in lightning ?
While saving the user object record i am getting this below error :
Review the errors on this page. LanguageLocaleKey field is required.
LanguageLocaleKey field is not available on User object page layout.
Please assist me.
I have one custom object named as XYZ which is lookup relationship to Contact object.
When i am seeing contact record page XYZ related list block it is shows null value present if contact first name is blank.

i.e : 
XYZ 
Action                      Name               CreatedDate                   LastModifiedDate                Status
Edit | Delete            null Kumar         9/19/2017                       9/19/2017                           Active
Edit | Delete            Ajith Kumar        9/19/2017                       9/19/2017                           Active



Can anyone known this ?
 
I need to create a user record from a Custom button in Contact screen. Clicking on this button should display the New User screen with pre filled fields with values from the underlying Contact record. Since URL hacks do not work in Lightning I tried to create an Object specific Quick Action. But the problem is I am unable to select "User" object as target object to create in the quick action. Is it a limitation of salesforce? or is there an alternative approach to create a User record with pre filled fields? Please help.
I have a Apex class that automatically creates a lead when certain conditions apply to case from another Org. However, the state field is a picklist and somestimes the field values from the sending org are not always in the receiving orgs picklist. How can I validate that the State received is actually in the picklist. 

My initial thought was to create a string array with all of the valid values and compare the state against that, but if the picklist changes, then my code will not be accurate. Any suggestions would be much appreciated. 
ActionSupport:
A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by the server when a particular event occurs, such as a button click or mouseover.
It allows components to be refreshed asynchronously by calling the controller’s method when any event occurs (like click on button). It allows us to do partial page refresh asynchronously without refreshing full page.
ActionRegion: An area of a Visualforce page that demarcates which components should be processed by the Force.com server when an AJAX request is generated. Only the components in the body of the <apex:actionRegion> are processed.

Let's consider a scenario:
1. If Account Industry is "Banking", then "Annual Revenue" field should be mandatory.
2. If Account Industry is "Other", then "Description" field will be mandatory.
We can make a field required using Validation rules, then why should we go for ActionSupport?
Because validation rules will be applied after clicking on Save button i.e. after DML operation is performed on the database. This is time consuming process. Hence we go for action support component <apex:actionSupport>.
Action components are used for improving the page performance by refreshing the part of the page (without loading the whole page)
 
AccountFieldRequired:
<apex:page standardController="Account"   >
<apex:sectionHeader title="Account" subtitle="Edit Page" />
<apex:form >
<apex:pageBlock title="Account Information" mode="mainDetail">
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}" />
<apex:commandButton value="Cancel" action="{!cancel}" />
</apex:pageBlockButtons>
<apex:pageBlockSection title="Info">
<apex:inputField value="{!Account.Name}" />
<apex:inputField value="{!Account.AccountNumber}" />
<apex:pageBlockSectionItem >
<apex:outputLabel > Account Industry</apex:outputLabel>
<!--Action region specifies what region of the form should be processed by Force.com when an AJAX request is generated -->
<apex:actionRegion >
<apex:inputField value="{!Account.Industry }" >
<apex:actionSupport event="onchange" reRender="revenueRequired" />
<!--Action support component controls the behavior of the form and adds AJAX support to your actionRegion -->
</apex:inputField>
</apex:actionRegion>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection id="revenueRequired" title="Details">
<!--referring rerender attribute using id -->
<apex:inputField value="{!Account.AnnualRevenue}" required="{!IF(Account.Industry=='Banking', true, false)}"  />
<apex:inputField value="{!Account.Description}" required="{!IF(Account.Industry=='Other', true, false)}"/>
<!-- Here required="{!IF(Account.Industry=='Banking', true, false)}" is used to make a field required based on condition -->
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

Output: If Account Industry is “Banking”, then “Annual Revenue” will be mandatory

User-added image

Output: If Account Industry is “Other”, then “Description” will be mandatory.

User-added image
 
Explanation:
In the above example,
"Account" is the Standard Controller.
"mainDetail" is the pageBlock mode used to display the page background color as white.
"ActionRegion" specifies what region of the form should be processed by Force.com when an AJAX request is generated
<apex:actionSupport"> component controls the behavior of the form and adds AJAX support to your actionRegion
"reRender" attribute is used to refresh a particular section or a Visualforce code block.
required="{!IF(Account.Industry=='Banking', true, false)}" is used to make a field required when Account Industry is "Banking"
"Id" is used to refer "reRender" attribute.

Thank You.
Sohel Mohd
Can somebody explain what are the scenarios for both and how to implement them:
1. Calling controller method from JavaScript
2. Calling Javascript Function from controller
Hello All,

So far I've had experience writing Apex Triggers & the Test Classes. I am looking for some pointers that will help me modify the test class, which will give me a better coverage of the Apex Class. I've always written Test classes separately, and not within the class. It was written by our previous developer that is a part of the syncing (salesforce & remedy).

I am open to either modify the existing class/test class or just write a separate test class that will give me a better code coverage( Current 29%). The lines not covered by the test class are highlighted in Bold, Italic.

Below is the complete Class and the Test class within:


global class WS_RemedyEW{
 WebService static list<list<String>> getRemedyEW(String serialNumber, String SONumber){

    fxExtendedWarranty.FX_Extended_WarrantySoap syncRem = new  fxExtendedWarranty.FX_Extended_WarrantySoap();
    fxExtendedWarranty.AuthenticationInfo syncRemAuth = new fxExtendedWarranty.AuthenticationInfo();
    syncRemAuth.userName = 'mthomas';
    syncRemAuth.password= 'tinu@1980';
    syncRem.parameters = syncRemAuth;
    try{              
        fxExtendedWarranty.getListValues_element[] getResponce = syncRem.OpGetList('','','','','','','','','','','','','','','','','',serialNumber,SONumber,'');

        list<list<string>> ewDetails = new list<list<string>>();
        
        for(fxExtendedWarranty.getListValues_element ewItem: getResponce){
            list<string> ewElement = new list<string>();
            ewElement.add(ewItem.Serial_Number);
            ewElement.add(ewItem.SO_Number);
            ewElement.add(ewItem.CommencementMonth);
            ewElement.add(ewItem.CommencementYear);
            ewElement.add(ewItem.Company_Name);
            ewElement.add(ewItem.Customer_Company_Name);
            ewElement.add(ewItem.CustomerName);
            ewElement.add(ewItem.Dealer);            
            ewElement.add(ewItem.ExpirationMonth);
            ewElement.add(ewItem.ExpirationYear);
            ewElement.add(ewItem.Full_EW);
            ewElement.add(ewItem.HW_EW);
            ewElement.add(ewItem.Part_Number);
            ewElement.add(ewItem.PONumber);
            ewElement.add(ewItem.Product);
            ewElement.add(ewItem.ProductName);
            ewElement.add(ewItem.SW_FW_EW);
            ewElement.add(ewItem.ADV_EW);
            if (string.valueof(ewItem.POS_Date).length() > 0) {ewElement.add(ewItem.POS_Date.substring(0,10));} else {ewElement.add(ewItem.POS_Date);}
            ewDetails.add(ewElement);            
        }
       return ewDetails;        

     }catch(Exception e){   
        //Write to the error log file
    }  
  return null;
 }
   private static testMethod void myTest() {
    getRemedyEW('MSN%','1');
  }
}

HI

Can any one explain me abou get and set methods in apex?

 

give a samplel program to understand these methods?