• John Manager Training Dep
  • NEWBIE
  • 30 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 1
    Likes Given
  • 44
    Questions
  • 26
    Replies
Hi Team,

I am developing a Java web application which needs to access Salesforce objects. Using the Java web page login, on successful login, I want to be able to access certain standard and custom objects.

How do I perform this?

Can I restrict the access of data in the salesforce objects based on the user login form Java web application? How do I go about it?

Many Thanks in advance for all your help and support!
Hi Team,

I took back up of lightning AURA components from Salesforce org. I have the zip file containing those AURA components.

The AURA components have been purged from the recycle bin. How do I restore the AURA component back into Salesforce org?

Many Thanks in advance for all your help and support1
Hi Team,

I have certain lightning aura components which I want to delete. I am aware that I need to remove those components from the lightning pages where the aura components are being used.
How do I find those lightning pages?
Many Thanks in advance!
Hi Team,

I have an Apex code which used below SOQL,
ID cUID=  UserInfo.getUserId() ;

        User cU= [Select id, Name, ContactId from User where id = :cUID limit 1];

        Contact cC= [Select id, Name, AccountId, Account.name from Contact where id = :cU.ContactId limit 1];

        ID accountId = cC.AccountId;
The ContactId will have a value only for users who are enabled for Partner or Customer Portal accounts.

How do I create a Test Class and test it?
Also, it has lightning components, how do I test it?

 
Hi Team,

In my org, I see there is a code to update the read unread checkbox(r_u_cbox) field to true when the current owner of a case opens the record on the salesforce page and refreshes it.

I was able to test the UpdateCaseCheckboxonRef class to cover 100% of the code but when I add the aura component to the lightning page layout, the class functionality does not seem to execute. Could anyone guide please?

Class is mentioned below,
public class UpdateCaseCheckboxonRef {

    @AuraEnabled
    public static boolean execFunc(string idOfCase) {
    
    string name;
    case currRec =    [Select id, r_u_cbox, status, OwnerId, Owner.Username FROM case where 
        id =:idOfCase];
    if(currRec.OwnerId == UserInfo.getUserId() && !currRec.r_u_cbox)
        {
            currRec.r_u_cbox = true;
            
             update currRec;
            return true;
             
        }
        else{return false;}
        
    }
}

The aura components are mentioned below,
.cmp aura
<aura:component controller="UpdateCaseCheckboxonRef" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction,lightning:actionOverride" access="global"  >
    
    <lightning:workspaceAPI aura:id="workspace"/>
  <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> 
    
</aura:component>
.js controller aura
({
	doInit : function(component, event, helper) {
        
        var contactId = component.get("v.recordId");
        var action = component.get("c.execFunc");
        action.setParams({ 
            "Id": contactId});
        
        action.setCallback(this, function(response) {
            var state = response.getState();
            var res = response.getReturnValue(); 
            console.log('res valuse'+JSON.stringify(res));
            if(res == "true"){
		var workspaceAPI = component.find("workspace");
        workspaceAPI.getFocusedTabInfo().then(function(response) {
           var focusedTabId = response.tabId;
            workspaceAPI.refreshTab({
                      tabId: focusedTabId,
                      includeAllSubtabs: true
             });
        })
        .catch(function(error) {
            console.log(error);
        });
            }
                });
	}
})

helper.js aura
({
	helperMethod : function() {
		
	}
})




 
Hi Team,

I have the interface mentioned below,
public interface MainInterface {
 
  void bInsert();
  void bUpdate();
  void bDelete();
  void aInsert();
  void aUpdate();
  void aDelete();
  void aUndelete();
 
}
I want to get overall code coverage of 100% for the interface, Any suggestions please?
Hi Team,

I have 2 classes,
public class SelectMultiple{    
    @auraenabled public String label {get; set;}
    @auraenabled public String value {get; set;}
    @auraenabled public boolean selected {get; set;}
    @auraenabled public boolean disabled {get; set;}
}

public class Chroma_Detail {

    @auraenabled public List<SelectMultiple> Sprint {get; set;}  
}
How do I create Test Class to get 100% code coverage for this?
Hi Team,

Salesforce workbench seems to be easy to migrate, delete or perform other actions on the salesforce PROD(as well as lower) environments.

I am not sure who is the developer of Salesforce workbench and is it safe to use it in our Salesforce Production environment?
Can the developer of Salesforce workbench hack my company information?
Hi Team,

I have a certain Apex class and corresponding Test Apex class in Dev(Sandbox), Systems, User acceptance test and Production regions of sfdc.com.

I want to delete that Apex class and assoiciated Test Apex class component from all the 4 sfdc.com regions mentioned above.

I am new to the project and do no know what tool the previous developers used. My manager is also clueless.

We do not have any IDE installed on our machines.

I heard of salesforce workbench online tool to be used to delete apex components.

Can someone let me know how to delete the apex components from salesforce environments?

Can I manually delete from apex components from the setup option of the salesforce environments?

Many Thanks for all your help and support!

 
Hi Team,

I want to get list of Visual Force pages, Apex classes, Triggers and aura components used?

For finding the VF pages used in the last 90 days, I am using the SOSL mentioned below,
SELECT Id, Markup, Name FROM ApexPage WHERE Id IN (SELECT ApexPageId FROM VisualforceAccessMetrics)

Can someone let me know if this is correct?

Als how do I get list of , Apex classes, Triggers and aura components used in last 90 days or so?

Many Thanks for all your help and support!
Hi Team,

I have visual force pages mentioned below in my org,
FileNotFound
ForgotPasswordConfirm
IdeasHome
SiteLogin
SiteRegisterConfirm
SiteTemplate
StdExceptionTemplate
Unauthorized
UnderConstruction
AnswersHome
BandwidthExceeded
Communicationrefresh

I do not see any controller for these VF pages.
Certain of these VF pages have been access in the past 90 days as per report from information for "visualforceaccessmetrics" object.

How do I find out to know which process within salesforce is calling these pages without any controller?

Many Thanks in advance!
Hi Team,

I see the Apex mentioned below in my org,
ForgotPasswordController
LightningForgotPasswordController
LightningLoginFormController
LightningSelfRegisterController
ChangePasswordController
CommunitiesLandingController
CommunitiesLoginController
CommunitiesSelfRegConfirmController
CommunitiesSelfRegController

It has corresponding Visual force and Aura components.

It looks like they are automatically generated by sfdc.com.

I am not sure under what circumstance do they get generated? Any suggestions?
Where can I find the description for those Apex, Aura and Visual Force Lightning components?

Many Thanks in advance!
Hi Team,

Is it possible to display certain fields in the salesforce page layout based on the checkbox?
For eg if ChecboxField = TRUE
Show 10 fields in Page Layout.
if ChecboxField = FALSE
Show 5 fields in Page Layout.

I want to use the same Record Type.

Any constructive suggestion or feedback much appreciated!
Hi Team,

I have below requirement,

1) The Case can be created using email-to-case or manually.
2) There is a related object Resume.(It has ContactID field from Contact object using lookup relationship)
3) Both Case and Resume object has CaseStatus & Training fields. Also, Resume object has CasNumber field.
CaseNumber is a lookup field and CaseStatus is a derived field based on Case object CaseStatus.
4) Resume object has Trainingcourse field which mentions which course a Contact is assigned to. Each ContactID may have multiple entries in the resume object.
5) When a new Case is created and Training field is assigned to the Case, the combination of ContactId and Training should be checked if it exists in Resume object.
If combination exist and CaseNumber is present in Resume object, then Case should NOT be created. An error message should be thrown on the screen.
If combination exist and Casenumber is NOT present in Resume object, then Case should be created and CaseNumber should be entered in Resume object.

If the Combination of ContactId and Training does not exist in Resume table, Case should get created. ==> I know this doesn't make sense but thats requirement.
6) When an existing Case objects Training field is modified, the combination of ContactId and new Training should be checked if exists in Resume object.
If combination exist and CaseNumber is present in Resume object, then Case should NOT be created. An error message should be thrown on the screen.
If combination exist and Casenumber is NOT present in Resume object, then Case should be created and CaseNumber should be entered in Resume object.

If the Combination of ContactId and Training does not exist in Resume table, Case should get created. ==> I know this doesn't make sense but thats requirement.

I am planning to use Process Builder and Flow Builder Spring 19' combination  to check the condition, update the Case details in the Resume object.
I am not sure how can I prevent creation of Case if the combination of ContactId and Trainingcourse fields are already present in the Resume object?

Many Thanks in advance for all your help and support!
Hi Team,

I have a requirement where the new case should not be created if field A(Contact ID lookup field) & field B(custom text field) combination already exists.
Is this possible to achieve the requirement using validation rule?

I know for a fact that as on date, VLOOKUP cannot be used on standard objects.

Any constructive suggestions are much appreciated!

Thanks!