How to show custom button on custom objects? - salesforce

I have one custom object Named Itnery and i created one custom button Named Save and in page layout under custom button section i drag the button there but it not shown in the Itnery window when i opened it.Itnery section comes with Opportunity window.
Second thing is i want to save the data related to Itnery like email,from,to etc on button click as i created and i did it as under:
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
Itinerary obj= new Itinerary;
obj.Email_Content_c = {!Itinerary_c.Email_Content__c};
obj.Email_Subject_c={!Itinerary_c.Email_Subject__c};
obj.Email_To_c={!Itinerary_c.Email_To__c};
obj.Flight_Info_c={!Itinerary_c.Flight_Info_c};
obj. Itinerary_c={!Itinerary_c.Itinerary_c};
obj.Opportunity_c={!Itinerary_c.Opportunity__c};
Database.update(obj);
message ='Saved Successfully';
window.location.reload();
Behavior: execute javascript
Content Source " Onclick javascript
please let me knw if anythng wrong in the code also..as i am new to saleforce
Thanks

I think you want to add your custom "Save" button to the related list.
Do it like this:
- at the Opportunity layout page click on "Edit layout" link
- then scroll down to related list (Itnery)
- click on the tool icon
- in the popup window you will see the settings of the related list
- there are "Columns" and "Buttons" areas, click on "Buttons"
- there are standard and custom buttons: select your custom button and click on the "Add" button
- save you settings

Related

Salesforce buttons on Lightning

In the clasic Salesforce, I have the next button type URL:
In the Opportinity view I add this button correctly and work well:
But if i change to Lightning experience.... I cant add this button to view:
The button dont appear in the options:
¿Any can help me?
Basically I need a button that opens an external page, passing variables such as the opportune ID ...
I tried with javascript button but I have the same problem.
After you created a button or link for your object (e.g. Opportunity), you should add it to an appropriate layout.
Create a button: Setup -> Object Manager -> Opportunity -> Buttons, Links, and Actions -> New Button or Link
Add a button to a layout: Setup -> Object Manager -> Opportunity -> Page Layouts -> [Your layout]

WinForm button click methods are being renewed. with button onclick_1

I just finished completing my winforms app. Suddenly when I was changing background color of gridview. When I started my app for final tests the buttons were not working. I checked their on click code and it was correct. Then I double clicked the button it created new button onClick_1 method. SO now all the buttons are doing it :( I dont' know what to do. Please help
Looks like your events are no longer coupled to your code.
Do this for each of your buttons:
Open your designer
Click on your button
Open your properties tab
In this menu, click on the events button
You'll find your "Click" event.
Click on the arrow and select the correct event.

Referencing current dialog in ExtJS from a CQ5 component dialog

I'm new to CQ5 and ExtJS and this is my scenario:
I created a new component with its own dialog for authoring. In the dialog I added a checkbox field with a custom xtype that I created. What I want to do is this:
Whenever the checkbox is checked/unchecked, I want to dynamically add/remove a TAB to the existing dialog to show further authoring options.
I've seen how to handle ExtJS' Window and TabPanel but I can't figure out how to get the reference of the dialog I'm in so that I can manipulate it (add/remove tabs).
I tried CQ.Ext.WindowMgr.getActive() to see if that gets me my window/dialog but it's not giving me what I expect.
Any ideas? Thanks!
You probably want to add listener(s) to your field.
http://dev.day.com/docs/en/cq/current/developing/widgets.html#Dynamic Dialogs
You should be able to use this.findParentByType to find the parent dialog.

Tooltip does not disappear after a new page is loaded

I am using twitter boostrap to implement tooltip for my web app (twipsy)
My implementation is as follows:
%li.friend
%a{:href=>"#!/<%=nick%>/<%=question_slug%>", :rel=>"twipsy", :title=>"click to see xxxx's muse"}
%img{src: "<%= avatar_url %>"}
The sequence of steps is as follows:
1) Hover on the avatar I want to click => tooltip appears above avatar (no issue)
2) Click on avatar to load a new page
3) New page is loaded but the tooltip shown in 1) did not disappear and just remain displayed on the newly loaded page.
Is there any additional parameters I need to set to ensure that the tooltip disappears in step 3)?
As tooltip toggles on mouseenter and leave when you click the element and DOM structure is replaced with new page the mouseleave on the avatar is never triggered as the element was removed programmatically while mouse was hovering over it.
To fix that you need to call the .tooltip('hide') method when you click the avatar.

Check button like in "solution explorer" in visual studio

there's "show all files" check button in solution explorer tab in visual studio. How can I make such a button ? /* give me a class */
My manager wants exactly the same button and it's behavior ..
Or is it not "free" button ?
Edit: I see some people didn't understand my question. Some explainations:
I need a check button exactly like in visual studio (like "show all files" button). I need a "check" bahavior when I clicked a button it shows some half-transparent blue layer on a button image. And I need a mouse hover behavior when a half-transparent blue layer added to a button image. I hope you understand my english
It is a button. Create a button, assign an image (if you want the pretty picture) and put an OnClick event handler in. In your event handler, you'll need to add the code to do what is required.
Solution Explorer provides you with an organized view of your projects and their files in treeview.You can do this
by implementing your own treeview and showing all the files and folders inside the root folder.
you can check this thread to get started with treeview
I need a check button exactly like in visual studio (like "show all files" button).
I'm assuming you need a button that looks like the button in VS, not a button that behaves like the button in VS.
It's a toolbar button. Add a Toolstrip to your form, add a button to the toolstrip, set the CheckOnClick property to true and add a custom image.

Resources