• parashermohit
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies


<apex:selectlist id="select-from"><selectoptions value="{!options}"></selectoptions></apex:selectlist>


$('#select-from :elected').val() giving undefined.
while accessing selectlist id it showing the [Object object],but when i am trying to print selected option value its showing  "Undefined".


Hi,

i am facing issue with setting reply to In Email,Earlier it was working fine but now its not .

can any one suggest.



<apex:selectlist id="select-from"><selectoptions value="{!options}"></selectoptions></apex:selectlist>


$('#select-from :elected').val() giving undefined.
while accessing selectlist id it showing the [Object object],but when i am trying to print selected option value its showing  "Undefined".


Hi, 

   I have a requirement of creating dynamic triggers for Custom Objects which are also being created dynamicaly through MetaData API . 

 

I search and came to know that Tooling API can help me creating dynamic triggers for REST API but  I am not getting how to configure this to my project and use it.....................

 

 

Can I get some example of creating dynamic Triggers through Tooling API..........................

 

Well I tried 

 

String json = '{"Name" : "COTrigger", \'"TableEnumOrId" : "Inventory__c"\',\'"Body" : "trigger COTrigger on Inventory__c (after insert) { }"\'}'; 

LoginResult loginResult = binding.login('pooja.avantsoft59@gmail.com', 'Test1234@');

        HttpRequest req = new HttpRequest();
        req.setEndpoint('https://ap1.salesforce.com/services/data/v28.0/tooling/sobjects/ApexTrigger');
req.setMethod('POST');        
req.setHeader('Content-Type','application/json');
       
        req.setHeader('Authorization','OAuth 00D90000000nlxu!AQIAQCuO8z08yJ1hMR_4.OEL_RYoBwKaWMK4ttOpLevsJBRqFIptV2lkenMZIXObFS3n3EtJmNBjjyWGF8ZM7xp_DX9IEHNw');
         
req.setBody(json);

        Http httpReq = new Http();
        HttpResponse res = httpReq.send(req); 
        System.debug('hii'+res.getBody());

 which always give me error as "16:24:52:435 USER_DEBUG [16]|DEBUG|hii[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]"

 

Although I checked and copy pasted Session ID correctly still it gives me this error again n again.... 

 

Any kind of help would be appreciated.

 

Thanks in advance...!!!

Pooja