Forum Replies Created

  • Using stadard page we can have these kind of messages only when we save info , but we cannot have this for delete actions as the page will be redirected to some predefined page. The only way is to customize the detail page usign visual force and there we can have own custom validation.

  • Hi Manpreet,
    For trigger deploymet we need atleast 1% code coverage and Overall coverage > 75%

    Example:-
    1. If trigger code coverage = 0% and Overall coverage >= 75% Result deplyment failed (Code Coverage Error)
    2. If trigger code coverage > 1% and Overall coverage < 75% Result deplyment failed (Code Coverage Error)
    3. If trigger code coverage > 1% and Overall coverage >= 75% Result deplyment Success

    • This reply was modified 6 years, 10 months ago by  Satya.
  • Satya

    Member
    January 9, 2018 at 9:04 am in reply to: Updating Rollup Summary field executes the parent object trigger?

    If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure.
    So, updating the child inputs to a roll-up summary field can cause a trigger on an object to fire.

  • Using standard page we can have these kind of messages only when we save info , but we cannot have this for delete actions as the page will be redirected to some predefined page. The only way is to customize the detail page using visual force and there we can have own custom validation.

    Workaround :

    You can override Delete button with your javascript custom delete.
    Check you condition in JAVASCRIPT and if satisfied then display alert message. else delete that record.

  • Hi Shaharyar,
    The Set class is not an iterable object type, and cannot participate in several common functions yet, including DML operations. Convert the Set to a List, instead.

  • Satya

    Member
    January 9, 2018 at 9:02 am in reply to: How can i write a Salesforce trigger for below given scenario ?

    Hi Shariq,

    I tried your solution in my developer org but it was not working So i have made a minor change in your code and its working fine now.

    so the latest code is :

    trigger ContactRoleTrigger on Opportunity (after update) {

    List<Opportunity> opps = [select stagename,(select id from OpportunityContactRoles) from opportunity where id in:Trigger.new];
    for(Opportunity opp:opps){
    if(opp.OpportunityContactRoles.size() ==0 && opp.StageName==’closed Won’){
    opp.addError(‘error’);
    }
    }
    }

  • Satya

    Member
    January 2, 2018 at 11:31 am in reply to: What are different types of tabs present in salesforce?

    Custom tabs display custom object data or other web content embedded in the application.

    Custom Object Tabs—For your custom object data. Custom Object Tabs display the data of your custom object in a user interface tab. Custom object tabs look and function just like standard tabs.
    Web Tabs—For other web content Custom Web Tabs display any external Web-based application or Web page in a Salesforce tab. You can design Web tabs to include the sidebar or span across the entire page without the sidebar.
    Visualforce Tabs—For Visualforce pages Visualforce Tabs display data from a Visualforce page. Visualforce tabs look and function just like standard tabs.
    Flexible Page Tabs—For Flexible Pages, to include them in the Salesforce1 navigation menu.Flexible Page Tabs let you add Flexible Pages to the Salesforce1 navigation menu.
    Also,

    Lightning Page tabs- let you add Lightning Pages to the Salesforce1 navigation menu.
    Subtab apps support only Web Tabs and Visualforce Tabs.

    Reference: https://help.salesforce.com/apex/HTViewHelpDoc?id=dev_tabscreate.htm

  • Satya

    Member
    April 29, 2016 at 7:28 am in reply to: What are the reasons for data loss in Salesforce?

    Data loss may cause due to following reasons:

    • Changing data and date-time
    • Altering to percent,number and currency from other data types
    • Changing from multi-select picklist, checkbox, auto number to other types
    • Altering to multi-select picklist from any type except picklist
    • Changing to auto-number except from text
    • Changing from text-area to e-mail, phone, URL and text
  • Satya

    Member
    April 1, 2016 at 8:48 am in reply to: Automate the approval process?

    you can Automate the approval process by using this piece of code in your opportunity trigger:-

    if(oldMap.get(oppObj.Id).Fire_Custom_Approval__c == false && oppObj.Fire_Custom_Approval__c == true){
    Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
    req1.setComments('Submitting request for approval!');
    req1.setObjectId(oppObj.Id);
    Approval.ProcessResult result = Approval.process(req1);
    }

  • Satya

    Member
    April 1, 2016 at 8:19 am in reply to: Is it possible to call javascript function in an apex controller?

    Try It:-
    https://developer.salesforce.com/forums/?id=906F000000093zeIAA

    • This reply was modified 8 years, 7 months ago by  Satya.
    • This reply was modified 8 years, 7 months ago by  Satya.
  • Satya

    Member
    March 29, 2016 at 10:16 am in reply to: Adding error messages to nonfield inputs
  • Satya

    Member
    March 22, 2016 at 1:16 pm in reply to: How to execute Apex from Custom button or Javascript?

    We can call any apex method through JavaScript by following function:
    sforce.apex.execute("class_Name","Method_Name",{Parameter_Name:Parameter_Value});