CreatedBy Field Issue

Hi Community,

 

Below is the business rule,

 

CreatedBy : Lookup column on "Contact"

FunctionalGroup : Custom Lookup Column on "Contact"

Send to Audit : Custom field

 

this is Code I have written in the cusotm module: 

I debug my code on mobile emulator and found that variable createdBy is undefined inside If condition.

 

 

I have checked this. 

var createdBy = record.get("CreatedBy.Id");

and It is working fine, means I am not getting createdBy as undefined.

 

Then why "CreatedBy.UsrFunctionalGroup.Id" is not working?

 

Can anyone help me with this issue?

 

Many Thanks in advance!

 

Akshit.

 

Like 0

Like

5 comments

Hi Akshit, 

For this try to add CreatedBy in attribute and mentioned all field which you need in lookupListConfig parameter for more detail you can see my below code for Activity 

    "Account":{ 

                lookupListConfig:{ 

                    columns:["Type"] 

                } 

            }, 

Hi Meet,

 

Thanks for the response, Can you please tell me where I can find the "attribute" so that I can add CreatedBy?

 

Many Thanks.

Hi Akshit, 

 

Attributes is a configuration object property of the view model schema you can find more details in below link 

 

https://academy.creatio.com/docs/7-16-0/developer/front-end_development/client_schema_structure/attributes._the_%22attributes%22_property 



If you need example you can also take look at this:- 

 

https://academy.creatio.com/docs/developer/front-end_development/creatio_development_cases/page_configuration/adding_calculated_fields

 

Hi Meet,

 

I have to apply this business rule on creatio mobile application. And for that, I need to create a custom module in which I write my code for the business rule. 

So I didn't write this code on Object Section schema or Edit page Schema.

 

 

 

hi Akshit,

 

Ohh I see, I haven't implement this type of logic on Mobile application but I guess Mobile page also has the similar approach in that you have to define SyncColumns instead off lookupListConfig. 

You can find more details here:-https://academy.creatio.com/docs/developer/mobile_development/mobile_ap…;

Show all comments