• Sam Arora
  • NEWBIE
  • 35 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
Hi,
I have one field 'total no. of contacts' on account detail page.I want to update that no. whenever contact is deleted.
What will be the the trigger code for the same. 
Kindly help.

Regards.
Hi,
Need to create a trigger on Account.which took first 1st alphabet of name 2nd alphabet of lastname(Sam Arora 'SA')and after that createddate field value  month and year .All the value insert in test__c field.Example(SA-122018)
Thanks in Advance!  
<aura:component implements="force:hasRecordId,force:hasSObjectName" access= "global" >
    <ltng:require styles="/resource/SLDS231/assets/styles/salesforce-lightning-design-system-ltng.css"/>
    
    <aura:attribute name="recordId" type="String" default="{!recordId}"/>
    <aura:attribute name="sObjectName" type="String" default="{!sObjectName}"/>
    <aura:handler name="init" value="{!this}" action="{!c.gotoURL}"/>

      <h1>
        Hello Geeky developers :)
        <br/>
        I am from lightning.
    </h1>
    <br/>
    <!-- recordId and sObjectName attributes will be available for use.-->
    <h2> This is the record id : {!v.recordId}</h2>
    <br/>
    <h2> This is the SObject name of the current record : {!V.sObjectName }</h2>
</aura:component>



({
    gotoURL : function(component, event, helper) {
         
        var urlEvent = $A.get("e.force:navigateToURL");
        var PG_ID = component.get("v.recordId");
        var PG_SOBJ = component.get("v.sObjectName");
         
        action.setParams({ 
            "P_ID": PG_ID
        });
         action.setParams({ 
            "P_sob": PG_SOBJ
        });
        
    }
})

If i enter a number 100 then after saving of record it should be populated as one hundred only.
it should be work for 3 digit numbers..done in workflow  ??
Hi,
I have one field 'total no. of contacts' on account detail page.I want to update that no. whenever contact is deleted.
What will be the the trigger code for the same. 
Kindly help.

Regards.

If i enter a number 100 then after saving of record it should be populated as one hundred only.
it should be work for 3 digit numbers..done in workflow  ??