• hs dsd 19
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 7
    Replies
Hi all,
I have a scenario to build tree structure for an custom object which has its two own lookups(Parent and Alternate Parent).
I need to form a tree like 
Parent 
Child1
child a
abc 1 (For abc1, Child1 is Parent and child a is Alt Parent)
abc2 (for abc2, Child 1 is parent and no alternate parent). 
 
All there record has comes under same record of Custom obj 2.
My scenario is, 

For Custom obj2 named Plant1, then I have query all the records of Custom obj1 (Sites) and to display then as tree in lwc component.

Please suggest me ideas and share some code samples.


 
I have Some Trust Issues related to financial, law, background in accountancy, and Private Client Services. How can I control my all assets?
Hi All, 

I have the following formula (text) field below. However it isn't working as i expect it to.

IF( 
Candidate__r.Company_Group_Type_Text__c == 'Potentials', 
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qF', ''), 

IF( 
Candidate__r.Company_Group_Type_Text__c == 'Trusted', 
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qZ',''), 
IF( 
Candidate__r.Company_Group_Type_Text__c == 'Associate', 
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qK', ''), 
IF(
Candidate__r.Company_Group_Type_Text__c == 'Influencer', 
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qU', ''),
IF(
Candidate__r.Contact_ID__c  == '0030Y00001JQUHr', 
IMAGE('/servlet/servlet.FileDownload?file=0151j000000DoLm', ''),  
IF(
Source__c == 'Vacancy Lead' &&  Source_Date__c  >= TODAY() - 7 &&  Source_Date__c  <=  TODAY(), 
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp1y', ''),  
IF(
Source__c == 'Vacancy Lead' &&  Source_Date__c  >= TODAY() - 14 &&  Source_Date__c  <=  TODAY() - 8, 
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3f', ''),  
IF(
Source__c == 'Vacancy Lead' &&  Source_Date__c  >= TODAY() - 21 &&  Source_Date__c  <=  TODAY() - 15, 
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3G', ''),  
IF(
Source__c == 'Vacancy Lead' &&  Source_Date__c  >= TODAY() - 28 &&  Source_Date__c  <=  TODAY() - 22, 
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3V', ''),  
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 7 && Source_Date__c  <=  TODAY() && (Candidate__r.Company_Group_Type_Text__c == 'Influencer' || Candidate__r.Company_Group_Type_Text__c == 'Potentials' ||Candidate__r.Company_Group_Type_Text__c == 'Trusted' || Candidate__r.Company_Group_Type_Text__c == 'Associate'),
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp1y', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 14 && Source_Date__c  <=  TODAY() - 8 && (Candidate__r.Company_Group_Type_Text__c == 'Influencer' || Candidate__r.Company_Group_Type_Text__c == 'Potentials' ||Candidate__r.Company_Group_Type_Text__c == 'Trusted' || Candidate__r.Company_Group_Type_Text__c == 'Associate'),
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3f', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 21 && Source_Date__c  <=  TODAY() - 15 && (Candidate__r.Company_Group_Type_Text__c == 'Influencer' || Candidate__r.Company_Group_Type_Text__c == 'Potentials' ||Candidate__r.Company_Group_Type_Text__c == 'Trusted' || Candidate__r.Company_Group_Type_Text__c == 'Associate'),
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3G', ''),

IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 28 && Source_Date__c  <=  TODAY() - 22 && (Candidate__r.Company_Group_Type_Text__c == 'Influencer' || Candidate__r.Company_Group_Type_Text__c == 'Potentials' ||Candidate__r.Company_Group_Type_Text__c == 'Trusted' || Candidate__r.Company_Group_Type_Text__c == 'Associate'), 
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3V', ''),

NULL 
)))))))))))))

The Bold section shows that if the source is 'Vacancy Lead' AND the source date is within the last week AND if company group type text equals Trusted OR Potentials OR Associate OR Influencer. I have a record that meets this criteria but isn't returning the right document.

It is returning the document that is related to the criteria of the underlined section - which is if the Company group type text equals potentials

Hope someone can help!

I just started my Mulesfoft training but i cannot get the studio working!

Everytime it shows error occured just after workspace selection
Here is the error log:

 

!SESSION 2018-10-08 11:45:44.950 -----------------------------------------------
eclipse.buildId=unknown
java.version=11
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/uvaiskomath/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/uvaiskomath/.eclipse_keyring

!ENTRY org.eclipse.osgi 4 0 2018-10-08 11:46:08.122
!MESSAGE Application error
!STACK 1
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:410)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultHeadlessContext(E4Application.java:491)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:505)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:204)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399)
	... 22 more
Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 24 more

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-10-08 11:46:08.162
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NoClassDefFoundError: javax/annotation/PreDestroy
	at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:450)
	at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:156)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:78)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:111)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:178)
	at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.dispose(EclipseContextOSGi.java:99)
	at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.bundleChanged(EclipseContextOSGi.java:141)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168)
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
	at org.eclipse.osgi.container.Module.doStop(Module.java:634)
	at org.eclipse.osgi.container.Module.stop(Module.java:498)
	at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 21 more

Any idea on this? I am running on macOs HighSeirra , JDK 8 installed
Hi all,
         I am currently doing deployment using autorabit and changing the version to 43.I am getting this issue:-'objects/<Object_Name>.object -- Error: null is not a supported form factor. (line 0, column 0)'
Can anyone tell me how to resolve this?
Hi,
I have 2 triggers written named Account_Share and Delete_Share.
I am pushing data from external site into salesforce.
So,in Salesforce in Account object,one standard field named ownerID(Lookup User )  and one custom field named owner1__c (Lookup User ) should get updated whenever changes are done in the site.
But this is not happening.Even though changes are made in the site,same is not getting updated in salesforce, rather it  throws an error as follows:

Account {"Party_Sea_ID__c":3618,"Customer_Number__c":"C0354","Name":"LUXURY BRAND HOLDINGS INC.","DBA_Name__c":"LUXURY BRAND HOLDINGS","Customer_Group_Id__c":"a0028000015lr6gAAA","OwnerId":"00528000005HQRPAA4","owner1__c":"00528000005HQRPAA4","Terms_Id__c":"a042800000oV27IAAS","Default_Currency__c":"US DOLLARS","Industry":"Jewelry","Website":"www.luxurybrandholdings.com<http://www.luxurybrandholdings.com><http://www.luxurybrandholdings.com>","No_of_Doors__c":14,"NumberOfEmployees":0,"Store_Size__c":0,"Contact_Person__c":"0","Rolex_Dealer__c":"Y","Status__c":1,"Sales_Code__c":"ASSET AND MEMO","RecordTypeId":"01228000000QbiR","Asset_Credit_Limit__c":1000000.0,"Memo_Credit_Limit__c":1500000.0,"Outstanding_A_R_Balance__c":0.0,"Outstanding_Memo_Balance__c":0.0,"BillingStreet":"9 ROSS SIMONS DRIVE - 2920 , , ","BillingPostalCode":"2920"} Delete_Share: execution of BeforeUpdate caused by: System.DmlException: Delete failed. First exception on row 0 with id 00r28000020W8ELAA0; first error: DELETE_FAILED, cannot delete owner or rule share rows, id=00r28000020W8EL: [] Trigger.Delete_Share: line 89, column 1

-----------------------------------------------------------------------------------------------
Account_Share Trigger:
trigger Account_Share on Account (after insert,after update) {

 List<AccountShare> jobShares = new List<AccountShare>();
    
 for(Account a : trigger.new){

if (a.owner1__c != null) {
 
   

   AccountShare accountRecord = new AccountShare();
   accountRecord.AccountId= a.Id;
    
   
   System.Debug('************* Salesforce Account ID ******* '+a.Id);
   accountRecord.UserOrGroupId = a.owner1__c;
   System.Debug('************* Salesforce Custom Owner: Account Executive ******* '+ a.owner1__c);
    
  
   accountRecord.AccountAccessLevel= 'edit';
   System.debug('Account Acess: '+  accountRecord.AccountAccessLevel);
   
   accountRecord.OpportunityAccessLevel='Read';
   System.debug('Oppurtunity Acess: '+  accountRecord.OpportunityAccessLevel);
   
   System.debug('Acc_share_trigger Account Record: '+ accountRecord);
    
   jobShares.add(accountRecord);
 }  

 /** Insert all of the newly created Share records and capture save result **/
 Database.SaveResult[] jobShareInsertResult = Database.insert(jobShares,false);
 System.debug('Insert all of the newly created Share records: '+ jobShareInsertResult);


}
}
-------------------------------------------------------------------------------------------
Delete Share Trigger 
trigger Delete_Share on Account (before update) {


set<Id> AccountIDs = new Set<Id>();
for(Account a: trigger.new){
AccountIDs.add(a.id);
}
List<AccountShare> jobShares = new List<AccountShare>();

map<String,AccountShare> accountShareMap = new Map<String,AccountShare>();

for(AccountShare accShare : [select AccountId, UserOrGroupId from AccountShare where AccountId in :AccountIds])
{
 accountShareMap.put(String.valueOf(accShare.UserOrGroupId),accShare);

}



for(Account a : trigger.new){
Account oldAccount = Trigger.OldMap.get(a.id);
if ((a.owner1__c != oldAccount.owner1__c) && (a.ownerId != oldAccount.owner1__c)){
 
   AccountShare accountRecord = accountShareMap.get(string.valueOf(oldAccount.owner1__c)); 
    if (accountRecord  != null)
    jobShares.add(accountRecord);
  }
 }

if(jobShares.isEmpty() == false ){

 delete jobShares;
 }
 }


 
Like you mighta static resource i.e. {!$Resource.resource_name}

How would you do this with a document stored in the Document Tab object? {!$Document.doc_name}

I would rather not include a direct link with document id - doesn't that change from Sandbox to Production?
  • March 06, 2017
  • Like
  • 0