Skip to main content
added 212 characters in body
Source Link
Caspar Harmer
  • 20.6k
  • 4
  • 35
  • 69

You need to AuraEnable your Apex method.

Try this:

@AuraEnabled
public static String saveBook(Book__c b)

Also, you should add a default param to your attribute:

<aura:attribute name="book" type="Book__c" 
                default="{'sobjectType:'Book__c', 'Book_Name__c': '' , 'Book_Arthur__c':''}"/>

You need to AuraEnable your Apex method.

Try this:

@AuraEnabled
public static String saveBook(Book__c b)

You need to AuraEnable your Apex method.

Try this:

@AuraEnabled
public static String saveBook(Book__c b)

Also, you should add a default param to your attribute:

<aura:attribute name="book" type="Book__c" 
                default="{'sobjectType:'Book__c', 'Book_Name__c': '' , 'Book_Arthur__c':''}"/>
Source Link
Caspar Harmer
  • 20.6k
  • 4
  • 35
  • 69

You need to AuraEnable your Apex method.

Try this:

@AuraEnabled
public static String saveBook(Book__c b)