+ Start a Discussion
Gurditta GargGurditta Garg 

CRUD on custom object

Hi,

 

I've a list of records(rows) for a custom object(table) where i want to apply crud operations i.e. create new object instance (record), update the existing ones (editng the records not inline instead in a new page). i want to use only one controller for all the operations.

 

please let me know the possible solutions.

 

thanks in advance.

Jeff MayJeff May

you might look at the <apex:detail> Visual Force tag.  It will give you 'built in' behavior for the object you are viewing.

skodisanaskodisana
Hi,

We have an appexchange application. below is the link.
Please check.

https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003J6KcEAK

Thanks,
Srikanth. K
Gurditta GargGurditta Garg
@JeffM i'm looking for custom view,create,edit etc everything i need custom using my own UI and own controllers.

thanks
Gurditta GargGurditta Garg
@skodisana sir i have to use my own UI and controllers.
Jeff MayJeff May

In that case, you'll need to add a set of methods in your controller, and use <apex:commandButton> or <apex:commandLink> tags on your Visual Force page.  This can all be in one controller, but the controller will need to also query for the desired records.

 

Once you have the list of records, you can use any of the table tags.  If you put the <apex:commandLink> or <apex:commandButton> on the table row with the record, you'll need to make sure to pass a parameter to the controller method for the link or button indicating which record should be worked on.  Since the list is maintained in the controller, you'll just operate on that list item.

Gurditta GargGurditta Garg
@Jeff, i'm following the exactly same that you're saying, but the problem comes because i'm using jQuery by which i create some tabs dynamically where i'm using iframe which doesnot refresh my page and so the parameter i dont get in the controller.

i'm using this for passing a parameter(<apex:param name="selectedScorecard" value="{!c.Id}" assignTo="{!selectedScorecardID}"/>)
Jeff MayJeff May

Sorry to say you have now left my areas of expertise.  Perhaps someone else has some thoughts.

Gurditta GargGurditta Garg

@JeffM well its ok

thanks.