• noobi dev
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi, I have implemented OAuth2.0 flow and get access-token. I am trying to create user on salesforce endpoint with generated access-token and domain. But I m getting below error while creating user.

HTTP/1.1 404 Not Found [Date: Fri, 01 Apr 2016 13:29:32 GMT, Content-Security-Policy-Report-Only: default-src https:; script-src https: 'unsafe-inline' 'unsafe-eval'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /_/ContentDomainCSPNoAuth?type=mydomain, Set-Cookie: BrowserId=qrsv8O_ITjKV-Jf-YuIKoA;Path=/;Domain=.salesforce.com;Expires=Tue, 31-May-2016 13:29:32 GMT, Expires: Thu, 01 Jan 1970 00:00:00 GMT, Sforce-Limit-Info: api-usage=2/15000, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked]
org.apache.http.conn.BasicManagedEntity@191a2138
[Date: Fri, 01 Apr 2016 13:29:32 GMT, Content-Security-Policy-Report-Only: default-src https:; script-src https: 'unsafe-inline' 'unsafe-eval'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /_/ContentDomainCSPNoAuth?type=mydomain, Set-Cookie: BrowserId=qrsv8O_ITjKV-Jf-YuIKoA;Path=/;Domain=.salesforce.com;Expires=Tue, 31-May-2016 13:29:32 GMT, Expires: Thu, 01 Jan 1970 00:00:00 GMT, Sforce-Limit-Info: api-usage=2/15000, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked]
en_IN
org.apache.http.impl.client.ClientParamsStack@4fde3189


If anyone have idea about this, please help.

After reading tons of links, posts and many documents, I decided to ask for help here, hopping some guru can help me with this issue:
 

<!-- Visualforce Remote object component for Products -->
<apex:remoteObjects >
<apex:remoteObjectModel name="PriceBookEntry" jsShorthand="Prod" fields="id, Name, Pricebook2Id, UnitPrice, IsActive">
</apex:remoteObjectModel>
</apex:remoteObjects>

I have done this javascript fuction to display records from PriceBookEntry Object using remoteObject in Javascript:

function fetchPB(){var wh = new SObjectModel.Prod();
    wh.retrieve({
      where:{
            Pricebook2Id : {eq:'01so0000002r3TBAAY'}, 
            IsActive : {eq:true},
            UnitPrice : {gt: 0}
      },
      limit: 5
      },function(err, records){
        if(err) alert(err.message);
        else {
          records.forEach(function(record) {             
            var divCol = $('<div class="row">');
            var p = record.get("Pricebook2Id");
            alert('row => ' + record.toString());
            var detail = $('<p>'+record.get("Name")+'<br/></p>');           
            var link1 = $('<p><br/><input type="check" name="optCheck"></p> ');
            link1.click(function(){              
              $('#inputProduct2').val(record.get("UnitPrice"));
            });
            detail.append(link1);
            h3.append(detail); 
            divCol.append(product);
            divCol.appendTo('#prodRow');
          });
        }
      });      
}

When I execute this function I can see in the developer console of my browser the post action and the data is coming from the server

User-added image
Even I see the data is coming I can't get the object's values, if I display a javascript alert with the object information I can't see values only this:

User-added image

I'm prety sure this answer will be not only a big help for me but for the entire SF comunity.

Thanks in Advance.