I am currently maintaining parent child relationsh...
# administration
g
I am currently maintaining parent child relationship for custom record using vendor center login. The challenge is when I view the record, users are getting option to REMOVE the child record linking. I cannot remove the ALLOW child record editing as uncheck because that won't allow me to create new record. How can I restrict users from removing the linked child records
k
Have you tried making the field that does the join mandatory?
I feel like I've done that as a way to force it to have the remove button do nothing.
(can't save the child record edit if the field is blank)
g
Let me try that
But by click on remove button, the record already exist..so mandatory field will have value
k
right - but when you click the remove button - it clears that field - making it "blank" which results in a background error
so the page will temporarily act like the remove button succeeded - but nothing will happen
make sure you make it mandatory both on your custom form if you have one, and on the field itself
g
Thanks a lot...that worked
Also any idea how to remove the attach button
Users are able to add new child record to parent record by clicking on attach button
k
I am not aware of a way to do that. Wish I did though.
It's got to be possible - most likely via client script to hide the button I imagine
I just don't know how it's done
g
Ya..was planning for a script
Thanks for quick help on remove button
k
If you figure it out - do you mind replying here with how you did it?
g
Definitely
d
k
I'm not a huge fan of DOM modifications this way.
g
Ya....I'm using vendor center.... could be risk
k
Not that it's the worst thing in the world if it's simple - but just that if stuff ever starts going sideways, it's not supported and could make for a messy support interaction if they figure out you are doing it.