• Dev ListingOrg
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Enable Quote sObject from Apex Code
Hi,

I am using Quote sObject in Rest API call but in new instance, I have to enable Quote sObject manually by clicking checkbox in Setup -> Quote -> Settings -> Enable Quote.

How can I enable it from Apex Code ??

Please let me know how can I enable it from Apex Code.

Can we put some code in "Post Install Script"? How can we use Metadata in our apex code for enable Quotes when in install package in my customer's account.
 
Hello,

I want to call following code from visual force page. is it possible?


{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")} result = sforce.connection.query("select id,opportunityid from Quote where id = '{!Quote.Id}'") window.top.location.href =<br> "{!URLFOR( $Action.Quote.NewQuote ,null,[clone=1,id=Quote.Id,retURL="/"&Quote.Id],true)}&oppid=" +<br> result.records.OpportunityId


Currently this code is call from Excute Javascript option with Detail page button option of Salesforce.

I want to call this from visual force page. I want to override "New Quote" button of Opporunity. ( Standard button ).