You need to sign in to do that
Don't have an account?
RAJU_DEEP
Add new record through visualforce page.
Hello,
Here i am having a object named "item" which is having a Master-Details relationship field "Shipping Invoice". I am trying to add new record but the problem is that when I insert the other fields record are easily inserted but the "Shipping Invoice" field I unable. The code which i have tried to store the record including all the fields except "Shipping Invoice" is below:
public void saveItems(){
Item__c sItem = new Item__c(
name = iName,
Price__c = price,
Quantity__c = quantity,
Weight__c = weight,
//Shipping_Invoice__c = shipInvoice
);
insert sItem;
}
Please help me how to insert the record...
Thanks in advance.
Please paste the execption you are getting. That will help in understanding the exact issue you are into.
Are you passing ID value to Shipping_Invoice__c field in the below code? if not do so.
Hello,
Thanks for your reply i have tried that code and it shows this exception:
Illegal view ID saveItem. The ID must begin with /
I am unable to asign the id from user to the Shipping_Invoice__c (master-detail relationship field).