You need to sign in to do that
Don't have an account?

How to add Custom Objects to an App after creation of the objects?
Hi,
I am following the book "Developement with the Force.com platform" by JasonOuelette.
When creating the Custom Objects, I did not check the box to be visible in a tab, and so I could not add this object to the Custom App I was creating. Now I have a created fields and relationships in the custom object. How do I add this Object to the Custom App?
thanks
Svidya
"Remove View Report Link" option on Dashboard Component
In Salesforce Lightning, do we have any option to remove/disable the Drilldown/View report hyper link on Dashboard?.
Thanks,
Naren



Sorry for this issue you are facing.
Unfortunately, this is not possible as of now. There is an idea which is active on the success community for which you can upvote so that it can be available in the mere future.
You can find the idea at the below link. Hope this helps.
Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
Getting to 100 percent code coverage on my trailhead module “Write Negative Tests Unit”
My code is as follows.
Calculator Class
public class Calculator { public class CalculatorException extends Exception{} public static Integer addition(Integer a, Integer b){ return a + b; } public static Integer subtraction(Integer a, Integer b){ return a - b; } public static Integer multiply(Integer a, Integer b){ if(b==0 || a==0){ throw new CalculatorException('It doesn\'t make sense to multiply by zero'); } return a * b; } public static Decimal divide(Integer numerator, Integer denominator){ if(denominator == 0){ throw new CalculatorException('you still can\'t divide by zero'); } Decimal returnValue = numerator / denominator; if(returnValue < 0){ throw new CalculatorException('Division returned a negative value.' + returnValue); } return returnValue; } }
And my test class as follows
@isTest public class Calculator_Tests { @isTest public static void addition() { Calculator.addition(1, 0); } @isTest public static void subtraction() { Calculator.subtraction(1, 0); } @isTest public static void divide_throws_exception_for_division_by_zero() { Boolean caught = false; try { Calculator.divide(1, 0); } catch (Calculator.CalculatorException e) { System.assertEquals('you still can\'t divide by zero', e.getMessage(), 'caught the right exception'); caught = true; } System.assert(caught, 'threw expected exception'); } @isTest public static void divide_throws_exception_for_division_by_two() { Boolean caught = true; try { Calculator.divide(1, 2); } catch (Calculator.CalculatorException e) { System.assertEquals('you still can\'t divide by zero', e.getMessage(), 'caught the right exception'); caught = true; } System.assert(caught, 'threw expected exception'); } @isTest public static void multiply_by_one() { Boolean caught = false; try { Calculator.multiply(1, 0); } catch (Calculator.CalculatorException e) { System.assertEquals('It doesn\'t make sense to multiply by zero', e.getMessage(), 'caught the right exception'); caught = true; } System.assert(caught, 'threw expected exception'); } @isTest public static void multiply_by_two() { Boolean caught = true; try { Calculator.multiply(1, 2); } catch (Calculator.CalculatorException e) { System.assertEquals('It doesn\'t make sense to multiply by zero', e.getMessage(), 'caught the right exception'); caught = true; } System.assert(caught, 'threw expected exception'); } }


Infact you can change that not accepting the negative value like this
public static Decimal divide(Integer numerator, Integer denominator){ if(denominator == 0){ throw new CalculatorException('you still can\'t divide by zero'); } if(numerator < 0 || denominator < 0) throw new CalculatorException('negative value(s) not allowed.'); Decimal returnValue = numerator / denominator; return returnValue; }
and add another test method
@isTest public static void divide_throws_exception_for_negative_number() { Boolean caught = true; try { Calculator.divide(-1, 2); } catch (Calculator.CalculatorException e) { System.assertEquals('negative value(s) not allowed.',e.getMessage()); caught = true; } System.assert(caught, 'threw expected exception'); }
I hope this will help.

what will be the soql query to find the no child account records related to specific account record in account object




https://developer.salesforce.com/blogs/developer-relations/2013/05/basic-soql-relationship-queries.html (https://developer.salesforce.com/blogs/developer-relations/2013/05/basic-soql-relationship-queries.html )
Basic Examples of SOQL RELATIONSHIPS:
Child > Parent (Standard Object)
Selectid,Account.Name,Account.Phone,Account.industry,Account.Type,Account.Rating,Account.website,Account.Ownership,Account.AnnualRevenue,Account.NumberOfEmployees,Account.CleanStatus from Contact
Child >Parent(Custom Object)
Selectid,COLLEGE__r.Name,COLLEGE__r.Contact__c,COLLEGE__r.Count__c,COLLEGE__r.Highest_Marks__c,COLLEGE__r.Address__cfrom Studnt__c
Parent >Child(Standard object)
select Name, Industry, (select AssistantName, Email from contacts)from ACCOUNT
Parent >Child (Custom Object)
1select id,Name,(select Studnt__c.name__c from Studnts__r) from College__C
For further reference check this,
https://developer.salesforce.com/forums/?id=906F00000009BgeIAE
If it helps you and closes your query by marking it as solved so that it can help others in the future.
Thanks.

Validation Rule Not Working as Expected suggestions?
Hello,
I am stuck on a validation rule -
If Sub Category is either 'Attestation Form Complete' or 'Attestation Form Incomeplete', all the other fields listed must not be blank.
The current formula will not let me create the record even if all the fields listed are completed. Any suggestions would be helpful.
Thanks!

There is a problem in your formula:
Please try the below one:
AND(OR( ISPICKVAL(Sub_Category__c,"Attestation Form Complete"), ISPICKVAL(Sub_Category__c,"Attestation Form InComplete") ), OR( ISPICKVAL(Creditable_Coverage__c,""), ISBLANK(Start_Date__c), ISBLANK(End_Date__c), ISPICKVAL(Type_of_Coverage__c,""), ISPICKVAL(Relationship_to_Member__c,""), ISPICKVAL(Verbal_Permission_Obtained__c,"") ))
Thanks,
Maharajan.C

Superbadge Lightning Experience Specialist challenge8

and please refer my csv files.
Regards,
LinThaw

how to write the validation rule
field 1- mr
field 2- bean
in the field 3 i have to show 'mr bean '
basically i have to show the 2 fields value in the 3rd field


it can be done with formula field
field 3 will be Data TypeFormula type text
Data TypeFormula
field1__c + '' + field_2__c

Custom Object (Properties) not showing on Sales Lightning app!!
I am on Create Object-Specific Quick Actions unit on Trailhead and somehow when I get to Test the Action in the Salesforce Mobile App, nothing happens on the app. I cannot see the Properties Custom Object even in the navigation menu. I have been following all the steps exactly as they appear on each task, one by one and I also passed the challenge. So, clearly I am doing the right thing, but it bugs me that I cannot see the results on the Mobile App.
I have tried everything and looked everywhere but it seems that my Salesforce App is not connected to Trailhead or something! I apologise in advance if I am not making any sense as I am new to Salesforce.
I would really appreciate it if anyone have been through the same issue and found a solution or workaround.
Many Thanks.
A



We have a separate Trailhead team who can help you with these issues. So, can you please use the below link to reach out to them so that one of the Engineers will get in touch with you.
Support: https://trailhead.salesforce.com/en/help?support=home
Please mark this answer as best if it helps so that others facing same issue will find it useful.Thanks

<pre>
Integer loopCount = 0;
for ( Object obj : listOfObjects )
{
// do stuff here...
loopCount++;
}
</pre>

Try below Code in you Dev Console and see if this is what you are looking for. Basically reverse triangle logic is same in almost all OOP languages, it doesn't matter if it is Java or Apex all we are going to use is for loops!
String revTriangle = '';
Integer x = 1;
Integer y = 1;
for (x = 1; x <= 10; x++)
{
for (y = x; y <= 10; y++)
{
if (y<=x)
revTriangle +='*';
else
revTriangle+='*';
}
revTriangle+='\n';
}
System.debug('ReverserTriangle: \n' + revTriangle);
Thank you
It looks you havent create custom Tabs while defining custom objects first you need to create custom Tab for new objects Creating Tab Setup -->App Set up---> Create---> Tabs Click on new Tab [drop down shows all untabed objects ] select your object, set Tab style , click Next select profiles Save Adding To App Setup -->App Set up---> Create---> Apps Click on edit, edit available tab section Save Done Thanks, Bala