Home

Wednesday, 29 June 2016

Working with multiple Div and show only perticular div at the time of click

Step 1-Create Click Button which is navigate to div after a click.
<div class="buttons">
<a class="button" id="show1">Menu 1</a>
<a class="button" id="show2">Menu 2</a>
<a class="button" id="show3">Menu 3</a>
</div>
 Step 2-Create Div for show after click on link button.
<div>
<div id="dv1">div1</div>
<div id="dv2" style="display:none;">div2</div>
<div id="dv3" style="display:none;">div3</div>
</div>
Step 3 -Add Below script in Code
<script src="https://code.jquery.com/jquery-1.7.2.js"></script>
Step 4-Add below Javascript code with document.ready function
<script type="text/javascript">
$( document ).ready(function() {
$(function() {
    $('#show1').click(function() {
        $('div[id^=div]').hide();
        $('#dv1').show();
    });
    $('#show2').click(function() {
        $('div[id^=div]').hide();
        $('#dv2').show();
    });
    $('#show3').click(function() {
        $('div[id^=div]').hide();
        $('#dv3').show();
    });
});
});
</script>
 

add static resources in sales-force and used in lightning componenet

Step 1-Login with sales-force and goto Setup and click it.
Step 2-Goto Quick Search box and type static resources 
Step 3-Click on new button After that fill information like as name,description etc. 
Step 4-Click on file and choose resource file.
Step 5-Click save.

Above step store static resource.

Use it in lightning component-
test.cmp.
<component>
<lntg:reuire scripts="{Resource.resourcename}" afterSccriptsLoaded="{!c.methodname}"/> 
</component>

Above way we can add static resource in lightning component

Wednesday, 22 June 2016

Navigate from one component to another component attribute value in lightning Salesforce

Step 1-Create Component1.
<aura:component implements="force:appHostable">
 <aura:attribute name="accountid" type="String" />
<ui:button aura:id="btnId" label="Test" press="{!c.NavigateToComponent2}"/>
</aura:component>
NavigateToComponent2: function(component, event, helper) {
    var evt = $A.get("e.force:navigateToComponent");
        evt.setParams({
                componentDef: "Component2",
                componentAttributes: {
                myAttribute: component.get("v.id")
            }
        });
    evt.fire();    
}
Step 2-Create Componenrt2
<aura:component implements="force:appHostable">
 <aura:attribute name="accountid" type="String" />
 <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
   Hello
</aura:component>
doInit : function(component, event, helper) {
        alert(component.get("v.accountid")) ;
    }
Note-Passed Attribute name must be available in both component.

Sunday, 19 June 2016

Create Component Tab using Lightning Experience

Step 1- First You need to check In your salesforce account domain is created or not if not created  follow below youtube video


Step 2-You need to deploy this domain to all user. After creating domain you go in find Quick Box My Domain--> click on Deploy to All user.
Step 3- Go to Quick Find box and search Tab -> click on Lightning Component tab add your component here.
Note--Must be added below code in Component.
<aura:component controller="Suppliers_Light" implements="force:appHostable"> 

Step 4-After Successfully Added Again gone in Quick find box and search Salesforce Navigation add tab created tab run application

for More details follow below link-
Part1


Part2
 

Saturday, 18 June 2016

Create our Custom Domain in Salesforce

Step 1- Login with Sales-force .
Step 2- Click on Setup and After that Enter Domain in Quick find box.
Step 3 -Click on My Domain.
Step 4-At the down side Enter your Domain name and check availability and click on register domain .
Step 5- You get a message your domain name registration is pending .After some time your domain is register.

For more Details watch my you tube channel -
 

Lightning Experience in Sales force

Step 1- Login with Salesforce Account.
Step 2-Click on Setup after that go to left side of screen and find Lightning Experience and click.
Step3- At the bottom of page enable "Enable the new Salesforce Lightning".
Step 4-Find "Evaluate if Lightning Experience is Right for your Org" and click preview of Preview Your Org in Lightning Experience

For more details visit my Youtube channel-

 


Thursday, 16 June 2016

How to get text from image using c#

First we need to enable some feature of Micro Soft Office.For this Follow below step-
1) Go to Control Panel and open Add and Remove Program.
2) After that right click on Microsoft Office and click on change.
3) Click on Add or Remove Program after that select Office Tool.
4) Click on Drop Down arrow and select Microsoft office Document Imaging option
5) select Run all from my Computer.
after that its added.
Coding Part-
First need to add some reference
1) Microsoft Office Document Imaging(MODI)
2) Get file path and call this method with file path.
.
    public string getTextFromImage(string filelocation)
    {
        Document mdi= new Document();
        mdi.Create(filelocation);
        filelocation.OCR(MiLANGUAGES.miLANG_ENGLISH);
        MODI.Image mdiimgage= (mdi.Images[0] as MODI.Image);
        string text= mdiimgage.Layout.Text;
        mdi.Close();
        return text;
}
3) Its return extracted text from images.