• Ashutosh Limaye 8
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2
I have a server side controller which is creating a PageReference object to a page and then calling getContent().toString() on it. This works fine when the method is called from Anynonymous block. The HTML for the desired page is returned in String format.
But when I call this Apex controller's method from the Client side JS controller, the content that is returned is different. 
I read that the getContent() method is a callback method and I believe that the method call from the javascript controller is also asynchronous.Could it be that the javascript call back is not waiting long enough for the getContent() to return with the complete HTML?
I have two objects:
1)EProduct__c with field Quantity__C
2)EOrder__C with field OQuantity__c
my req. is when order get placed Quantity on product should get reduce as per quantity in order