You need to sign in to do that
Don't have an account?
abi dzar
Custom Object insert in Visualforce.
Hi guys, I really needs help, I want to add the data to my custom object. but, it does not work? I search the answer all over the community. Can anyone help me? I tried using Account as standard controller and it works and when I try my own custom object, it does not work. Do I missed something here?
<apex:page standardController="GetSatisfaction_Properties__c" > <apex:form > <apex:inputField value="{!GetSatisfaction_Properties__c.Community_name__c}" /> <apex:inputField value="{!GetSatisfaction_Properties__c.Username__c}"/> <apex:inputField value="{!GetSatisfaction_Properties__c.Password__c}"/> </apex:form> </apex:page>
Regards,
Abi Dzar
Hello Abi Dzar.
If you have create custom object it automatically create a required field called 'Name'. Therefore you have to add that field also
Change your code with Name field.
-Suresh
All Answers
Hello Abi Dzar.
If you have create custom object it automatically create a required field called 'Name'. Therefore you have to add that field also
Change your code with Name field.
-Suresh
Guys ,
Try this code also
Hope this will help you
Thanks,
Bala
Thanks a lot Suresh, It works!.
How if I dont want to let user add the name of the record? Can the name be hidden value?
One additional question, where usually people use to store settings variable for an application? in documents? custom settings or custom objects? which the settings have sensitive information like usename and password of something.
Regards,
Abi Dzar
>Can the name be hidden value? I think cannot hidden but you can use this filed for any of your custom field (Use name field for your Community_name__c field)
> Where usually people use to store settings variable for an application? I think better to use custom object and if you use password then do encode value before save.
-Suresh
Thanks again Suresh.
regards,
Abi Dzar
I did this and it doesn't work on a website ...
<apex:page standardController="Merchandise__c" >
<apex:form >
<apex:inputField value="{!Merchandise__c.Name}" />
<apex:inputField value="{!Merchandise__c.Description__c}" />
<apex:inputField value="{!Merchandise__c.Total_Inventory__c}"/>
<apex:commandButton action="{!save}" value="Save record"/>
<apex:commandButton action="Cancel" value="Cancel"/>
</apex:form>
</apex:page>
What could be happening?, it doesn't record anything, and It has the custom object permissions of Merchandise__c
What I should consider to public this on a website?
Regards,
naypers.
Hi,
I tried the code that you have given but it doesn't work. I am unable to save my custom object records. I have taken required filed as Auto number..Is that's the problem ?
Thank you,
Anil
.