When you right click on the splist item it shows you option to share the item with others. I want to replace this share action with my custom action. Anyone can run through with me how to solve this problem.
Sadiur - this can be done using SharePoint Designer (SPD). If you open the list in SPD, will also see in the bottom right corner a section where you can add Custom Actions. This allows you to add actions to the ribbon and/or the list item menu - what opens when you click the ellipsis. I don't know that you can remove the Share option that is there, maybe through an event receiver, but you can add new ones. That's how you hook up custom action to the list item, but not how to create the action itself. Hope that's what you were looking for.