Way to update a value in a View

Posted by mysteryminds on 04-Mar-2015 05:16

HI All 

Can anyone guide me a way to update the  record in a view  through trigger

What I would want when i select a record and run the trigger 

In a list view I would like to update a Column - DOCS - "complete"

All Replies

Posted by mysteryminds on 04-Mar-2015 08:09

even tried this code

if('{!R84549879#value}'== " ")

return "complete"

but when manually I'm binding the value its working,, here too there is a issue

if they are two records if I'm binding the record to row one its ok and when I bind the same value to second row the values of the row one is getting erased / becomes NULL

Posted by Ricardo Rafols on 04-Mar-2015 12:08

Hi mysteryminds,

Your "Docs" field is a lookup. It is not possible to update it using a string (i.e return "complete").

The "Docs" field is a reference to another object.

To update the field to show "complete" in your UI, you need to know the ID of the record in the referenced object that has the description "complete" and return the ID.

I.e

if('{!R84549879#value}'== " ")
return 12345;

PS: 12345 in the referenced object means "complete".

Posted by mysteryminds on 04-Mar-2015 12:39

Dear Ricardo

Thankyou

But I did not quite get the way you told me  

I've tried running the code in a way but it seems not be workingg  

Posted by Ricardo Rafols on 04-Mar-2015 15:24

Hi mysteryminds,

You can create a relation which would bind the values of one object to other

I.e
{!R12345.R111111}


Regards,
Ricardo

Posted by Ricardo Rafols on 04-Mar-2015 16:19


I.e

if('{!R12345#value}'== " ")
return {!R12345.R111111};

Posted by mysteryminds on 06-Mar-2015 19:15

thanks Ricardo

This thread is closed